Apply g++ 4.7 workaround in hash set macros to this compiler only
This workaround was already disabled for MSVC, as it resulted in a warning there, but it also gives a similar warning with clang and it seems better to restrict this workaround to gcc only rather than excluding another compiler.
This commit is contained in:
@@ -75,13 +75,13 @@ public: \
|
|||||||
// the names of the hasher and comparator classes are interpreted as naming
|
// the names of the hasher and comparator classes are interpreted as naming
|
||||||
// the base class which is inaccessible.
|
// the base class which is inaccessible.
|
||||||
// The workaround is to prefix the class names with 'struct'; however, don't
|
// The workaround is to prefix the class names with 'struct'; however, don't
|
||||||
// do this on MSVC because it causes a warning there if the class was
|
// do this unconditionally, as with other compilers (both MSVC and clang)
|
||||||
// declared as a 'class' rather than a 'struct' (and MSVC's std::unordered_set
|
// doing it causes a warning if the class was declared as a 'class' rather than
|
||||||
// implementation does not suffer from the access problem).
|
// a 'struct'.
|
||||||
#ifdef _MSC_VER
|
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
|
||||||
#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME
|
|
||||||
#else
|
|
||||||
#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) struct STRUCTNAME
|
#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) struct STRUCTNAME
|
||||||
|
#else
|
||||||
|
#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \
|
#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \
|
||||||
|
Reference in New Issue
Block a user