World Builder  1.1.0-pre
A geodynamic initial conditions generator
deprecate.h
Go to the documentation of this file.
1 // if deprecated is supported, which is definitely C++14, but some compilers support it before C++14.
2 // Once the world builder switches to C++14 this can be simplified.
3 #if defined(__has_cpp_attribute)
4 #if __has_cpp_attribute(deprecated)
5 #define DEPRECATED(msg, func) [[deprecated(msg)]] func
6 #endif
7 #else
8 #if defined(__GNUC__) || defined(__clang__)
9 #define DEPRECATED(msg, func) func __attribute__ ((deprecated(msg)))
10 #elif defined(_MSC_VER)
11 #define DEPRECATED(msg, func) __declspec(deprecated(msg)) func
12 #endif
13 #endif