Compiler detection: add support for C++17's [[deprecated]] on enumerators
Change-Id: I5cff94d036bd311aee2b6418dd793fde89de0938 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5417949fe2
commit
2a1d0c2669
@ -1152,6 +1152,11 @@
|
||||
# define Q_REQUIRED_RESULT [[nodiscard]]
|
||||
#endif
|
||||
|
||||
#if defined(__cpp_enumerator_attributes) && __cpp_enumerator_attributes >= 201411
|
||||
# define Q_DECL_ENUMERATOR_DEPRECATED Q_DECL_DEPRECATED
|
||||
# define Q_DECL_ENUMERATOR_DEPRECATED_X(x) Q_DECL_DEPRECATED_X(x)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Fallback macros to certain compiler features
|
||||
*/
|
||||
@ -1186,6 +1191,12 @@
|
||||
#ifndef Q_DECL_DEPRECATED_X
|
||||
# define Q_DECL_DEPRECATED_X(text) Q_DECL_DEPRECATED
|
||||
#endif
|
||||
#ifndef Q_DECL_ENUMERATOR_DEPRECATED
|
||||
# define Q_DECL_ENUMERATOR_DEPRECATED
|
||||
#endif
|
||||
#ifndef Q_DECL_ENUMERATOR_DEPRECATED_X
|
||||
# define Q_DECL_ENUMERATOR_DEPRECATED_X(x)
|
||||
#endif
|
||||
#ifndef Q_DECL_EXPORT
|
||||
# define Q_DECL_EXPORT
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user