X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f927337ccac8e2fc64a5286472d43954248b853..49a63afbad7646668df343d29edd88458bc7e0a9:/include/wx/meta/convertible.h diff --git a/include/wx/meta/convertible.h b/include/wx/meta/convertible.h index 99207d7273..1b46f7f21d 100644 --- a/include/wx/meta/convertible.h +++ b/include/wx/meta/convertible.h @@ -11,15 +11,28 @@ #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_