deprecated.hh
Go to the documentation of this file.
1 /*
2  * This file has been automatically generated by the jrl-cmakemodules.
3  * Please see https://github.com/jrl-umi3218/jrl-cmakemodules/blob/master/deprecated.hh.cmake for details.
4 */
5 
6 #ifndef JRL_WALKGEN_DEPRECATED_HH
7 # define JRL_WALKGEN_DEPRECATED_HH
8 
9 // Define a suffix which can be used to tag a type, a function or a a
10 // variable as deprecated (i.e. it will emit a warning when using it).
11 //
12 // Tagging a function as deprecated:
13 // void foo () JRL_WALKGEN_DEPRECATED;
14 //
15 // Tagging a type as deprecated:
16 // class Foo {};
17 // typedef Foo Bar JRL_WALKGEN_DEPRECATED;
18 //
19 // Tagging a variable as deprecated:
20 // int a JRL_WALKGEN_DEPRECATED = 0;
21 //
22 // The use of a macro is required as this is /not/ a standardized
23 // feature of C++ language or preprocessor, even if most of the
24 // compilers support it.
25 # if defined(__GNUC__) || defined(__clang__)
26 # define JRL_WALKGEN_DEPRECATED __attribute__ ((deprecated))
27 # else
28 # if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
29 # define JRL_WALKGEN_DEPRECATED __declspec (deprecated)
30 # else
31 // If the compiler is not recognized, drop the feature.
32 # define JRL_WALKGEN_DEPRECATED /* nothing */
33 # endif // __MSVC__
34 # endif // __GNUC__
35 
36 #endif