Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
59523924
Commit
59523924
authored
Nov 24, 2016
by
Maximilien Colange
Browse files
Use the [[deprecated]] standard attribute when possible.
* spot/misc/common.hh: Change SPOT_DEPRECATED definition.
parent
22292e60
Changes
1
Hide whitespace changes
Inline
Side-by-side
spot/misc/common.hh
View file @
59523924
...
...
@@ -30,12 +30,19 @@
#define SPOT_UNLIKELY(expr) (expr)
#endif
#ifdef __GNUC__
#define SPOT_DEPRECATED __attribute__ ((deprecated))
#elif defined(_MSC_VER)
#define SPOT_DEPRECATED __declspec(deprecated)
#else
#define SPOT_DEPRECATED func
#ifdef __has_cpp_attribute
# if __has_cpp_attribute(deprecated)
# define SPOT_DEPRECATED [[deprecated]]
# endif
#endif
#ifndef SPOT_DEPRECATED
# ifdef __GNUC__
# define SPOT_DEPRECATED __attribute__ ((deprecated))
# elif defined(_MSC_VER)
# define SPOT_DEPRECATED __declspec(deprecated)
# else
# define SPOT_DEPRECATED
# endif
#endif
#if defined _WIN32 || defined __CYGWIN__
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment