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:
@@ -1600,6 +1600,17 @@ template <typename T> void wxDELETE(T*& ptr);
|
||||
*/
|
||||
template <typename T> void wxDELETEA(T*& array);
|
||||
|
||||
/**
|
||||
Expands to the standard C++14 [[deprecated]] attribute if supported.
|
||||
|
||||
If not supported by the compiler, expands to nothing. If support for such
|
||||
compilers is important, use wxDEPRECATED_MSG() which is almost universally
|
||||
available.
|
||||
|
||||
@since 3.1.6
|
||||
*/
|
||||
#define wxDEPRECATED_ATTR(msg) [[deprecated(msg)]]
|
||||
|
||||
/**
|
||||
Generate deprecation warning with the given message when a function is
|
||||
used.
|
||||
|
Reference in New Issue
Block a user