diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 47e139b4..9131cba4 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -1012,7 +1012,14 @@ namespace std{ using ::type_info; } // // [[nodiscard]]: // -#ifdef __has_cpp_attribute +#if defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130) +#if __has_attribute(nodiscard) +# define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]] +#endif +#if __has_attribute(no_unique_address) +# define BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS [[no_unique_address]] +#endif +#elif defined(__has_cpp_attribute) // clang-6 accepts [[nodiscard]] with -std=c++14, but warns about it -pedantic #if __has_cpp_attribute(nodiscard) && !(defined(__clang__) && (__cplusplus < 201703L)) # define BOOST_ATTRIBUTE_NODISCARD [[nodiscard]]