From 2837a71877c0f5c1aca8f70e30130018bc53acac Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 27 Dec 2015 16:43:28 +0100 Subject: 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. --- apt-pkg/pkgcachegen.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/pkgcachegen.h') 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 #include +#if __cplusplus >= 201103L #include +#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 strMixed; std::unordered_map strSections; std::unordered_map strPkgNames; std::unordered_map strVersions; +#endif friend class pkgCacheListParser; typedef pkgCacheListParser ListParser; -- cgit v1.2.3