]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for g++ 3.2 (closes #10875)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Jun 2009 08:54:48 +0000 (08:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 5 Jun 2009 08:54:48 +0000 (08:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk1/glcanvas.h
include/wx/meta/convertible.h

index bf97a23063d84948cfeaff060516cded60d9e79d..97ed7c677d47eaecc87732e6f8c12736e54003b2 100644 (file)
@@ -50,7 +50,7 @@ public:
     // ------------------
 
 #if WXWIN_COMPATIBILITY_2_8
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                wxWindowID id = wxID_ANY,
                const wxPoint& pos = wxDefaultPosition,
@@ -61,7 +61,7 @@ public:
                const wxPalette& palette = wxNullPalette)
     );
 
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                const wxGLContext *shared,
                wxWindowID id = wxID_ANY,
@@ -73,7 +73,7 @@ public:
                const wxPalette& palette = wxNullPalette)
     );
 
-    wxDEPRECATED(
+    wxDEPRECATED_CONSTRUCTOR(
     wxGLCanvas(wxWindow *parent,
                const wxGLCanvas *shared,
                wxWindowID id = wxID_ANY,
index 99207d7273dcbf8a0884de8db2579f2d4c9f6632..d43fc2c74de5ac6277eb64087cbd2f70b4560ad5 100644 (file)
 #ifndef _WX_META_CONVERTIBLE_H_
 #define _WX_META_CONVERTIBLE_H_
 
+//
+// Introduce an extra class to make this header compilable with g++3.2
+//
+template <class D, class B>
+struct wxConvertibleTo_SizeHelper
+{
+       static char Match(B* pb);
+       static int  Match(...);
+};
+
 // Helper to decide if an object of type D is convertible to type B (the test
 // succeeds in particular when D derives from B)
 template <class D, class B>
 struct wxConvertibleTo
 {
-    static char Match(B* pb);
-    static int Match(...);
-
-    enum { value = sizeof(Match(static_cast<D*>(NULL))) == sizeof(char) };
+    enum { value = sizeof(wxConvertibleTo_SizeHelper<D,B>::Match(static_cast<D*>(NULL)))==sizeof(char)
+       };
 };
 
 #endif // _WX_META_CONVERTIBLE_H_