diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 2a23d7381e..a355c74ac7 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -188,6 +188,7 @@ Currently the following symbols exist: @itemdef{wxHAS_NATIVE_ANIMATIONCTRL, Defined if native wxAnimationCtrl class is being used (this symbol only exists in wxWidgets 3.1.4 and later).} @itemdef{wxHAS_NATIVE_DATAVIEWCTRL, Defined if native wxDataViewCtrl class is being used (this symbol only exists in wxWidgets 3.1.4 and later).} @itemdef{wxHAS_NATIVE_WINDOW, Defined if wxNativeWindow class is available.} +@itemdef{wxHAS_NOEXCEPT, Defined if the currently used compiler supports C++11 @c noexcept. @c wxNOEXCEPT is defined as this keyword in this case, and as nothing otherwise.} @itemdef{wxHAS_NULLPTR_T, Defined if the currently used compiler supports C++11 @c nullptr.} @itemdef{wxHAS_IMAGES_IN_RESOURCES, Defined if Windows resource files or OS/2 resource files are available on the current platform.} diff --git a/include/wx/defs.h b/include/wx/defs.h index a7472b60b3..a08dfb557d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -285,6 +285,14 @@ typedef short int WXTYPE; #define wxOVERRIDE #endif /* HAVE_OVERRIDE */ +/* same for noexcept keyword */ +#if __cplusplus >= 201703L || wxCHECK_VISUALC_VERSION(14) + #define wxHAS_NOEXCEPT + #define wxNOEXCEPT noexcept +#else + #define wxNOEXCEPT +#endif + /* Support for nullptr is available since MSVS 2010, even though it doesn't define __cplusplus as a C++11 compiler.