Also use [[deprecated]] when compiling with at least C++14

Signed-off-by: David Redondo <kde@david-redondo.de>
This commit is contained in:
David Redondo 2025-02-05 09:27:22 +01:00
parent 7c2ffb0d71
commit afd498b6f5

View file

@ -48,7 +48,7 @@ extern "C" {
#endif #endif
/** Deprecated attribute */ /** Deprecated attribute */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) || (defined(__cplusplus) && __cplusplus >= 201402L)
#define WL_DEPRECATED [[deprecated]] #define WL_DEPRECATED [[deprecated]]
#elif defined(__GNUC__) && __GNUC__ >= 4 #elif defined(__GNUC__) && __GNUC__ >= 4
#define WL_DEPRECATED __attribute__ ((deprecated)) #define WL_DEPRECATED __attribute__ ((deprecated))