From: Vadim Zeitlin Date: Fri, 5 Jun 2009 08:54:48 +0000 (+0000) Subject: compilation fixes for g++ 3.2 (closes #10875) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0503f19ca8379dbea48ab9618dc587d3399e5a42 compilation fixes for g++ 3.2 (closes #10875) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/gtk1/glcanvas.h b/include/wx/gtk1/glcanvas.h index bf97a23063..97ed7c677d 100644 --- a/include/wx/gtk1/glcanvas.h +++ b/include/wx/gtk1/glcanvas.h @@ -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, diff --git a/include/wx/meta/convertible.h b/include/wx/meta/convertible.h index 99207d7273..d43fc2c74d 100644 --- a/include/wx/meta/convertible.h +++ b/include/wx/meta/convertible.h @@ -11,15 +11,23 @@ #ifndef _WX_META_CONVERTIBLE_H_ #define _WX_META_CONVERTIBLE_H_ +// +// Introduce an extra class to make this header compilable with g++3.2 +// +template +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 struct wxConvertibleTo { - static char Match(B* pb); - static int Match(...); - - enum { value = sizeof(Match(static_cast(NULL))) == sizeof(char) }; + enum { value = sizeof(wxConvertibleTo_SizeHelper::Match(static_cast(NULL)))==sizeof(char) + }; }; #endif // _WX_META_CONVERTIBLE_H_