From bccc2df797a1b395effa983bc68d8dcdbe6806d3 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 12 Dec 2019 23:36:36 -0500 Subject: [PATCH] Fix Oracle C++ prior to the latest release. --- include/boost/config/detail/suffix.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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]]