]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix wxHash{Set,Map} compilation with g++ 4.7 in C++11 mode.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2012 10:22:45 +0000 (10:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2012 10:22:45 +0000 (10:22 +0000)
Fully qualify the hasher and comparator classes used with
WX_DECLARE_HASH_{SET,MAP} macros as they're used as base classes by the
standard library implementation in g++ 4.7 and using them without the scope
operator results in compilation errors because they're interpreted as being
(inaccessible) base classes and not the global ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/html/htmlpars.h
interface/wx/hashmap.h
interface/wx/hashset.h
src/common/translation.cpp
src/generic/grid.cpp
src/xrc/xmlres.cpp
utils/wxrc/wxrc.cpp

index 045060a4ea3a04b47060785e2323a8f49640ed1c..cecb016c3f59e812e1aaf0beb3ccb62a160085c6 100644 (file)
@@ -29,7 +29,7 @@ class wxHtmlTextPieces;
 class wxHtmlParserState;
 
 WX_DECLARE_HASH_SET_WITH_DECL_PTR(wxHtmlTagHandler*,
-                                  wxPointerHash, wxPointerEqual,
+                                  ::wxPointerHash, ::wxPointerEqual,
                                   wxHtmlTagHandlersSet,
                                   class WXDLLIMPEXP_HTML);
 WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxHtmlTagHandler*,
index c103e44afa4688b620b62bbfa8a1399f394824dd..6364471596a668001265e3ae1e4e6ff570bd410b 100644 (file)
@@ -83,8 +83,8 @@
     @code
     WX_DECLARE_HASH_MAP( int,
                          wxString,
-                         wxIntegerHash,
-                         wxIntegerEqual,
+                         ::wxIntegerHash,
+                         ::wxIntegerEqual,
                          MyHash );
 
     // using an user-defined class for keys
 
     WX_DECLARE_HASH_MAP( MyKey,      // type of the keys
                          SOME_TYPE,  // any type you like
-                         MyKeyHash,  // hasher
-                         MyKeyEqual, // key equality predicate
+                         ::MyKeyHash,  // hasher
+                         ::MyKeyEqual, // key equality predicate
                          CLASSNAME); // name of the class
     @endcode
 
index 36469e47e54a831e6ceba9fda578077b10b89cd6..a3406431c74495d420263e02f6d278884d037fc9 100644 (file)
         class MyClass { ... };
 
         // same, with MyClass* keys (only uses pointer equality!)
-        WX_DECLARE_HASH_SET( MyClass*, wxPointerHash, wxPointerEqual, MySet1 );
+        WX_DECLARE_HASH_SET( MyClass*, ::wxPointerHash, ::wxPointerEqual, MySet1 );
         // same, with int keys
-        WX_DECLARE_HASH_SET( int, wxIntegerHash, wxIntegerEqual, MySet2 );
+        WX_DECLARE_HASH_SET( int, ::wxIntegerHash, ::wxIntegerEqual, MySet2 );
         // declare a hash set with string keys
-        WX_DECLARE_HASH_SET( wxString, wxStringHash, wxStringEqual, MySet3 );
+        WX_DECLARE_HASH_SET( wxString, ::wxStringHash, ::wxStringEqual, MySet3 );
 
         MySet1 h1;
         MySet2 h1;
@@ -70,8 +70,8 @@
 
     @code
         WX_DECLARE_HASH_SET( int,
-                            wxIntegerHash,
-                            wxIntegerEqual,
+                            ::wxIntegerHash,
+                            ::wxIntegerEqual,
                             MySet );
 
         // using an user-defined class for keys
         };
 
         WX_DECLARE_HASH_SET( MyKey,      // type of the keys
-                            MyKeyHash,  // hasher
-                            MyKeyEqual, // key equality predicate
+                            ::MyKeyHash,  // hasher
+                            ::MyKeyEqual, // key equality predicate
                             CLASSNAME); // name of the class
     @endcode
 
index ae01cce21085d4e08d7f5d9755c21afb6d70b75f..ea6d25955becee80aedfb4e1397a0842d6bb0947 100644 (file)
@@ -1440,7 +1440,7 @@ wxString wxTranslations::ChooseLanguageForDomain(const wxString& WXUNUSED(domain
 
 namespace
 {
-WX_DECLARE_HASH_SET(wxString, wxStringHash, wxStringEqual,
+WX_DECLARE_HASH_SET(wxString, ::wxStringHash, ::wxStringEqual,
                     wxLocaleUntranslatedStrings);
 }
 
index a1393a091780bff8d38dfb3ececf410063aafdd0..37ee7707ee97a5e7668994be937ac27e7fe51d14 100644 (file)
@@ -72,7 +72,7 @@ const char wxGridNameStr[] = "grid";
 // Required for wxIs... functions
 #include <ctype.h>
 
-WX_DECLARE_HASH_SET_WITH_DECL_PTR(int, wxIntegerHash, wxIntegerEqual,
+WX_DECLARE_HASH_SET_WITH_DECL_PTR(int, ::wxIntegerHash, ::wxIntegerEqual,
                                   wxGridFixedIndicesSet, class WXDLLIMPEXP_ADV);
 
 
index 55ae02d4d33d0b81a6c128df7ae0f29b11dfae19..fe712f89d5539e653265002b7e83659f7e885add 100644 (file)
@@ -107,7 +107,7 @@ class wxXmlResourceDataRecords : public wxVector<wxXmlResourceDataRecord*>
     // this is a class so that it can be forward-declared
 };
 
-WX_DECLARE_HASH_SET_PTR(int, wxIntegerHash, wxIntegerEqual, wxHashSetInt);
+WX_DECLARE_HASH_SET_PTR(int, ::wxIntegerHash, ::wxIntegerEqual, wxHashSetInt);
 
 class wxIdRange // Holds data for a particular rangename
 {
index 1998c76687fdcdd2013ffa53a079e37fd8dfc07f..d6b9799e9283e0e78ae833b9949967d3448f7f51 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/mimetype.h"
 #include "wx/vector.h"
 
-WX_DECLARE_HASH_SET(wxString, wxStringHash, wxStringEqual, StringSet);
+WX_DECLARE_HASH_SET(wxString, ::wxStringHash, ::wxStringEqual, StringSet);
 
 class XRCWidgetData
 {