From c806f70b73038242b5810a0f596e5aa321759b3e Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 8 Mar 2020 18:14:01 +0200 Subject: [PATCH] Prefer __attribute__((deprecated)) on all g++-compatible compilers (f.ex. Intel) --- include/boost/mp11/detail/config.hpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/include/boost/mp11/detail/config.hpp b/include/boost/mp11/detail/config.hpp index e00fd63..0a9ded5 100644 --- a/include/boost/mp11/detail/config.hpp +++ b/include/boost/mp11/detail/config.hpp @@ -123,19 +123,14 @@ // BOOST_MP11_DEPRECATED(msg) -#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) +#if BOOST_MP11_WORKAROUND( BOOST_MP11_CLANG, < 304 ) # define BOOST_MP11_DEPRECATED(msg) -#elif BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 50000 ) +#elif defined(__GNUC__) || defined(__clang__) # define BOOST_MP11_DEPRECATED(msg) __attribute__((deprecated(msg))) -#elif BOOST_MP11_WORKAROUND( BOOST_MP11_CLANG, < 304 ) -# define BOOST_MP11_DEPRECATED(msg) -#elif BOOST_MP11_CLANG -// -pedantic warns about [[deprecated]] when in C++11 mode -# define BOOST_MP11_DEPRECATED(msg) __attribute__((deprecated(msg))) -#elif defined(__SUNPRO_CC) -# define BOOST_MP11_DEPRECATED(msg) -#else +#elif defined(_MSC_VER) && _MSC_VER >= 1900 # define BOOST_MP11_DEPRECATED(msg) [[deprecated(msg)]] +#else +# define BOOST_MP11_DEPRECATED(msg) #endif #endif // #ifndef BOOST_MP11_DETAIL_CONFIG_HPP_INCLUDED