diff --git a/include/boost/system/detail/generic_category.hpp b/include/boost/system/detail/generic_category.hpp index e3792c9..35175f8 100644 --- a/include/boost/system/detail/generic_category.hpp +++ b/include/boost/system/detail/generic_category.hpp @@ -50,6 +50,11 @@ inline std::string generic_error_category_message( int ev ) # if defined( BOOST_MSVC ) # pragma warning( push ) # pragma warning( disable: 4996 ) +# elif defined(__clang__) && defined(__has_warning) +# pragma clang diagnostic push +# if __has_warning("-Wdeprecated-declarations") +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +# endif # endif inline std::string generic_error_category_message( int ev ) @@ -83,6 +88,8 @@ inline char const * generic_error_category_message( int ev, char * buffer, std:: # if defined( BOOST_MSVC ) # pragma warning( pop ) +# elif defined(__clang__) && defined(__has_warning) +# pragma clang diagnostic pop # endif #endif diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 1562e4b..d0c2735 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -849,6 +849,11 @@ inline char const * error_category::message( int ev, char * buffer, std::size_t # if defined( BOOST_MSVC ) # pragma warning( push ) # pragma warning( disable: 4996 ) +# elif defined(__clang__) && defined(__has_warning) +# pragma clang diagnostic push +# if __has_warning("-Wdeprecated-declarations") +# pragma clang diagnostic ignored "-Wdeprecated-declarations" +# endif # endif std::strncpy( buffer, m.c_str(), len - 1 ); @@ -856,6 +861,8 @@ inline char const * error_category::message( int ev, char * buffer, std::size_t # if defined( BOOST_MSVC ) # pragma warning( pop ) +# elif defined(__clang__) && defined(__has_warning) +# pragma clang diagnostic pop # endif return buffer;