example-robot-data: include/example-robot-data/deprecated.hh Source File

example-robot-data 5.0.0 Set of robot URDFs for benchmarking and developed examples

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 EXAMPLE_ROBOT_DATA_DEPRECATED_HH
7# define EXAMPLE_ROBOT_DATA_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 () EXAMPLE_ROBOT_DATA_DEPRECATED;
14//
15// Tagging a type as deprecated:
16// class Foo {};
17// typedef Foo Bar EXAMPLE_ROBOT_DATA_DEPRECATED;
18//
19// Tagging a variable as deprecated:
20// int a EXAMPLE_ROBOT_DATA_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(__cplusplus) && (__cplusplus >= 201402L)
26# define EXAMPLE_ROBOT_DATA_DEPRECATED [[deprecated]]
27# define EXAMPLE_ROBOT_DATA_DEPRECATED_MESSAGE(message) [[deprecated(#message)]]
28# elif defined(__GNUC__) || defined(__clang__)
29# define EXAMPLE_ROBOT_DATA_DEPRECATED __attribute__ ((deprecated))
30# define EXAMPLE_ROBOT_DATA_DEPRECATED_MESSAGE(message) __attribute__ (( deprecated(#message) ))
31# else
32# if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
33# define EXAMPLE_ROBOT_DATA_DEPRECATED __declspec (deprecated)
34# define EXAMPLE_ROBOT_DATA_DEPRECATED_MESSAGE(message) __declspec ( deprecated(#message) )
35# else
36// If the compiler is not recognized, drop the feature.
37# define EXAMPLE_ROBOT_DATA_DEPRECATED /* nothing */
38# define EXAMPLE_ROBOT_DATA_DEPRECATED_MESSAGE(message)
39# endif // __MSVC__
40# endif // __cplusplus
41
42# if defined(__GNUC__) || defined(__clang__)
43# ifndef EXAMPLE_ROBOT_DATA_PRAGMA
44# define EXAMPLE_ROBOT_DATA_PRAGMA(X) _Pragma(#X)
45# endif
46# define EXAMPLE_ROBOT_DATA_DEPRECATED_HEADER(MSG) EXAMPLE_ROBOT_DATA_PRAGMA(GCC warning MSG)
47# elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
48# define EXAMPLE_ROBOT_DATA_STRINGIZE_(MSG) #MSG
49# define EXAMPLE_ROBOT_DATA_STRINGIZE(MSG) EXAMPLE_ROBOT_DATA_STRINGIZE_(MSG)
50# define EXAMPLE_ROBOT_DATA_DEPRECATED_HEADER(MSG) \
51 __pragma(message(__FILE__ "(" EXAMPLE_ROBOT_DATA_STRINGIZE(__LINE__) ") : Warning: " MSG))
52# else
53# define EXAMPLE_ROBOT_DATA_DEPRECATED_HEADER(MSG)
54# endif
55
56#endif