+/*
+ Macro taking the deprecation message. It applies to the next declaration.
+
+ If the compiler doesn't support showing the message, this degrades to a
+ simple wxDEPRECATED(), i.e. at least gives a warning, if possible.
+ */
+#if defined(__clang__) && defined(__has_extension)
+ #if __has_extension(attribute_deprecated_with_message)
+ #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
+ #else
+ #define wxDEPRECATED_MSG(msg) __attribute__((deprecated))
+ #endif
+#elif wxCHECK_GCC_VERSION(4, 5)
+ #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg)))
+#elif wxCHECK_VISUALC_VERSION(8)
+ #define wxDEPRECATED_MSG(msg) __declspec(deprecated("deprecated: " msg))
+#else
+ #define wxDEPRECATED_MSG(msg) wxDEPRECATED_DECL
+#endif
+
+/*
+ Macro taking the declaration that it deprecates. Prefer to use
+ wxDEPRECATED_MSG() instead as it's simpler (wrapping the entire declaration
+ makes the code unclear) and allows to specify the explanation.
+ */
+#define wxDEPRECATED(x) wxDEPRECATED_DECL x
+