gepetto-viewer 6.0.0
An user-friendly Graphical Interface
Loading...
Searching...
No Matches
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 GEPETTO_VIEWER_DEPRECATED_HH
7# define GEPETTO_VIEWER_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 () GEPETTO_VIEWER_DEPRECATED;
14//
15// Tagging a type as deprecated:
16// class Foo {};
17// typedef Foo Bar GEPETTO_VIEWER_DEPRECATED;
18//
19// Tagging a variable as deprecated:
20// int a GEPETTO_VIEWER_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 GEPETTO_VIEWER_DEPRECATED [[deprecated]]
27# define GEPETTO_VIEWER_DEPRECATED_MESSAGE(message) [[deprecated(#message)]]
28# elif defined(__GNUC__) || defined(__clang__)
29# define GEPETTO_VIEWER_DEPRECATED __attribute__ ((deprecated))
30# define GEPETTO_VIEWER_DEPRECATED_MESSAGE(message) __attribute__ (( deprecated(#message) ))
31# else
32# if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
33# define GEPETTO_VIEWER_DEPRECATED __declspec (deprecated)
34# define GEPETTO_VIEWER_DEPRECATED_MESSAGE(message) __declspec ( deprecated(#message) )
35# else
36// If the compiler is not recognized, drop the feature.
37# define GEPETTO_VIEWER_DEPRECATED /* nothing */
38# define GEPETTO_VIEWER_DEPRECATED_MESSAGE(message)
39# endif // __MSVC__
40# endif // __cplusplus
41
42# if defined(__GNUC__) || defined(__clang__)
43# ifndef GEPETTO_VIEWER_PRAGMA
44# define GEPETTO_VIEWER_PRAGMA(X) _Pragma(#X)
45# endif
46# define GEPETTO_VIEWER_DEPRECATED_HEADER(MSG) GEPETTO_VIEWER_PRAGMA(GCC warning MSG)
47# elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
48# define GEPETTO_VIEWER_STRINGIZE_(MSG) #MSG
49# define GEPETTO_VIEWER_STRINGIZE(MSG) GEPETTO_VIEWER_STRINGIZE_(MSG)
50# define GEPETTO_VIEWER_DEPRECATED_HEADER(MSG) \
51 __pragma(message(__FILE__ "(" GEPETTO_VIEWER_STRINGIZE(__LINE__) ") : Warning: " MSG))
52# else
53# define GEPETTO_VIEWER_DEPRECATED_HEADER(MSG)
54# endif
55
56#endif