]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcachegen.h
aptconfiguration: Set default compression level to 6
[apt.git] / apt-pkg / pkgcachegen.h
index 328d296bf823973c9eafeba4c19d762fdbe9af78..21a4a6a096dfa0b2bfb408bec9bd605cb3d8447e 100644 (file)
@@ -26,7 +26,9 @@
 
 #include <vector>
 #include <string>
-#include <map>
+#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);
 
-   std::map<std::string,map_stringitem_t> strMixed;
-   std::map<std::string,map_stringitem_t> strSections;
-   std::map<std::string,map_stringitem_t> strPkgNames;
-   std::map<std::string,map_stringitem_t> strVersions;
+   // 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;