Commit 59523924 authored by Maximilien Colange's avatar Maximilien Colange
Browse files

Use the [[deprecated]] standard attribute when possible.

* spot/misc/common.hh: Change SPOT_DEPRECATED definition.
parent 22292e60
......@@ -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__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment