Define wxHAS_NULLPTR_T if nullptr is supported
This is necessary because MSVS versions as old as 2010 support it, even if they don't have full C++11 support and so don't define __cplusplus appropriately. Extract the existing check for nullptr from wx/strvararg.h to wx/defs.h in order to allow reusing it.
This commit is contained in:
@@ -425,9 +425,7 @@ wxFORMAT_STRING_SPECIFIER(int*, wxFormatString::Arg_IntPtr | wxFormatString::Arg
|
||||
wxFORMAT_STRING_SPECIFIER(short int*, wxFormatString::Arg_ShortIntPtr | wxFormatString::Arg_Pointer)
|
||||
wxFORMAT_STRING_SPECIFIER(long int*, wxFormatString::Arg_LongIntPtr | wxFormatString::Arg_Pointer)
|
||||
|
||||
// Support for nullptr is available since MSVS 2010, even though it doesn't
|
||||
// define __cplusplus as a C++11 compiler.
|
||||
#if __cplusplus >= 201103 || wxCHECK_VISUALC_VERSION(10)
|
||||
#ifdef wxHAS_NULLPTR_T
|
||||
wxFORMAT_STRING_SPECIFIER(std::nullptr_t, wxFormatString::Arg_Pointer)
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user