From d32f9c5864a0fb87e04ffe37d823588ad789351b Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Sat, 19 Oct 2019 14:02:08 +0200 Subject: [PATCH] fixes warning in clang-6 --- include/boost/config/detail/suffix.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 86f6081e..584d3ab7 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -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))