Use standard [[deprecated]] attribute if available

Add yet another wxDEPRECATED_XXX macro, this one simply expanding to
C++14 [[deprecated]] attribute if it's available and nothing otherwise.

It's a bit ridiculous to have so many different macros for deprecating
things, but the new one is useful because the standard attribute can be
used to deprecated enum elements, which is impossible with MSVC-specific
__declspec(deprecated).
This commit is contained in:
Vadim Zeitlin
2021-07-11 13:36:46 +01:00
parent 4f7f7a9ce1
commit 7a8f2dffbd
3 changed files with 46 additions and 6 deletions

View File

@@ -171,6 +171,8 @@ Currently the following symbols exist:
wxBitmapToggleButton class is available in addition to wxToggleButton.}
@itemdef{wxHAS_CONFIG_TEMPLATE_RW, Defined if the currently used compiler
supports template Read() and Write() methods in wxConfig.}
@itemdef{wxHAS_DEPRECATED_ATTR, Defined if C++14 @c [[deprecated]] attribute is
supported (this symbol only exists in wxWidgets 3.1.6 or later).}
@itemdef{wxHAS_MEMBER_DEFAULT, Defined if the currently used compiler supports
C++11 @c =default.}
@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in