]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/font.h
fixing warning and compile error against 10.4
[wxWidgets.git] / include / wx / font.h
index 6d7b46a31a49964692fe4376c41088a1016e91bc..7ebc53d32595e234f28dfa5d152c3fa5fecb4a7f 100644 (file)
@@ -378,6 +378,11 @@ extern WXDLLIMPEXP_DATA_CORE(wxFontList*)    wxTheFontList;
 // compilers as it compares elements of different enums
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
 
 // compilers as it compares elements of different enums
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
 
+// Unfortunately some compilers have ambiguity issues when enum comparisons are
+// overloaded so we have to disable the overloads in this case, see
+// wxCOMPILER_NO_OVERLOAD_ON_ENUM definition in wx/platform.h for more details.
+#ifndef wxCOMPILER_NO_OVERLOAD_ON_ENUM
+
 inline bool operator==(wxFontFamily s, wxDeprecatedGUIConstants t)
 { return static_cast<int>(s) == static_cast<int>(t); }
 inline bool operator!=(wxFontFamily s, wxDeprecatedGUIConstants t)
 inline bool operator==(wxFontFamily s, wxDeprecatedGUIConstants t)
 { return static_cast<int>(s) == static_cast<int>(t); }
 inline bool operator!=(wxFontFamily s, wxDeprecatedGUIConstants t)
@@ -391,6 +396,8 @@ inline bool operator==(wxFontWeight s, wxDeprecatedGUIConstants t)
 inline bool operator!=(wxFontWeight s, wxDeprecatedGUIConstants t)
 { return !(s == t); }
 
 inline bool operator!=(wxFontWeight s, wxDeprecatedGUIConstants t)
 { return !(s == t); }
 
+#endif // // wxCOMPILER_NO_OVERLOAD_ON_ENUM
+
 #endif // FUTURE_WXWIN_COMPATIBILITY_3_0
 
 #endif
 #endif // FUTURE_WXWIN_COMPATIBILITY_3_0
 
 #endif