summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2015-12-27 16:43:28 +0100
committerJulian Andres Klode <jak@debian.org>2015-12-27 16:43:28 +0100
commit2837a71877c0f5c1aca8f70e30130018bc53acac (patch)
treebef60bfde975cf59e05307fec37c2e2f375fd605 /apt-pkg/pkgcachegen.h
parent1924be129eb7428284dc7aa35972d047c68cf85d (diff)
pkgcachegen.h: Hack around unordered_map not existing before C++11
This is for public users only, which cannot use the class at all, except for the static methods.
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 9001e334f..21a4a6a09 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -26,7 +26,9 @@
#include <vector>
#include <string>
+#if __cplusplus >= 201103L
#include <unordered_map>
+#endif
class FileFd;
class pkgSourceList;
@@ -41,10 +43,13 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
APT_HIDDEN map_stringitem_t WriteStringInMap(const char *String, const unsigned long &Len);
APT_HIDDEN map_pointer_t AllocateInMap(const unsigned long &size);
+ // Dirty hack for public users that do not use C++11 yet
+#if __cplusplus >= 201103L
std::unordered_map<std::string,map_stringitem_t> strMixed;
std::unordered_map<std::string,map_stringitem_t> strSections;
std::unordered_map<std::string,map_stringitem_t> strPkgNames;
std::unordered_map<std::string,map_stringitem_t> strVersions;
+#endif
friend class pkgCacheListParser;
typedef pkgCacheListParser ListParser;