X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f927337ccac8e2fc64a5286472d43954248b853..86ac84b8ce086e6bbda58f422d41f84268606e35:/include/wx/meta/convertible.h?ds=inline 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_