Fix Oracle C++ prior to the latest release.

This commit is contained in:
Edward Diener
2019-12-12 23:36:36 -05:00
parent 4fdd8bf833
commit bccc2df797

View File

@ -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]]