Merge pull request #301 from HDembinski/fix_warning_nodiscard

fixes warning in clang-6
This commit is contained in:
jzmaddock
2019-10-20 12:55:08 +01:00
committed by GitHub

View File

@ -996,7 +996,8 @@ namespace std{ using ::type_info; }
// [[nodiscard]]:
//
#ifdef __has_cpp_attribute
#if __has_cpp_attribute(nodiscard)
// 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]]
#endif
#if __has_cpp_attribute(no_unique_address) && !(defined(__GNUC__) && (__cplusplus < 201100))