diff --git a/include/wx/platform.h b/include/wx/platform.h index 45bb9cc3aa..47c1c4778c 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -611,7 +611,11 @@ Only 4.3 defines __GXX_RTTI by default so its absence is not an indication of disabled RTTI with the previous versions. */ -# if wxCHECK_GCC_VERSION(4, 3) +# if defined(__clang__) +# if !__has_feature(cxx_rtti) +# define wxNO_RTTI +# endif +# elif wxCHECK_GCC_VERSION(4, 3) # ifndef __GXX_RTTI # define wxNO_RTTI # endif diff --git a/include/wx/typeinfo.h b/include/wx/typeinfo.h index 14fb057fc9..c20106df30 100644 --- a/include/wx/typeinfo.h +++ b/include/wx/typeinfo.h @@ -106,7 +106,7 @@ typedef void (*wxTypeIdentifier)(); // WX_DECLARE_TYPEINFO() or WX_DECLARE_TYPEINFO_INLINE() however. #define _WX_DECLARE_TYPEINFO_CUSTOM(CLS, IDENTFUNC) \ public: \ - virtual wxTypeIdentifier GetWxTypeId() const \ + virtual wxTypeIdentifier GetWxTypeId() const wxOVERRIDE \ { \ return reinterpret_cast \ (&IDENTFUNC); \ diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index f8a3eb7871..8b1226a879 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -1750,6 +1750,15 @@ struct wxGridCellDateEditorKeyHandler } wxGridCellEditorEvtHandler* m_handler; + +#ifdef wxNO_RTTI + // wxEventFunctorFunction used when an object of this class is passed to + // Bind() must have a default ctor when using wx RTTI implementation (see + // see the comment before WX_DECLARE_TYPEINFO_INLINE() in wx/typeinfo.h) + // and this, in turn, requires a default ctor of this class -- which will + // never be actually used, but must nevertheless exist. + wxGridCellDateEditorKeyHandler() : m_handler(NULL) { } +#endif // wxNO_RTTI }; #endif // __WXGTK__