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
This commit is contained in:
Vadim Zeitlin 2009-06-05 08:54:48 +00:00
parent adcda299c0
commit 0503f19ca8
2 changed files with 15 additions and 7 deletions

View 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,

View File

@ -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 <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_