opw_macros.h
Go to the documentation of this file.
1 #ifndef OPW_MACROS_H
2 #define OPW_MACROS_H
3 
4 // clang-format off
5 
6 #if defined(__GNUC__) || defined(__clang__)
7 #define DEPRECATED(X) __attribute__((deprecated(X)))
8 #elif defined(_MSC_VER)
9 #define DEPRECATED(X) __declspec(deprecated(X))
10 #else
11 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
12 #define DEPRECATED(X)
13 #endif
14 
15 #if defined(__GNUC__) || defined(__clang__)-Wdeprecated-declarations
16 #define OPW_IGNORE_WARNINGS_PUSH \
17  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wignored-qualifiers\"") \
18  _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
19  _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
20  _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
21 
22 #define OPW_IGNORE_WARNINGS_POP _Pragma("GCC diagnostic pop")
23 
24 #elif defined(_MSC_VER)
25 #define OPW_IGNORE_WARNINGS_PUSH
26 #define OPW_IGNORE_WARNINGS_POP
27 #else
28 #pragma message("WARNING: You need to implement OPW_IGNORE_WARNINGS_PUSH and OPW_IGNORE_WARNINGS_POP for this compiler")
29 #define DEPRECATED(X)
30 #endif
31 
32 // clang-format on
33 #endif // OPW_MACROS_H


opw_kinematics
Author(s): Jon Meyer , Jeroen De Maeyer
autogenerated on Thu Jan 16 2025 03:40:37