From 6b0f642cdd940242582f057118f82375b800371e Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sun, 10 Dec 2023 12:47:57 -0800 Subject: [PATCH] gha --- include/boost/leaf/config.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/boost/leaf/config.hpp b/include/boost/leaf/config.hpp index 24c0f3c6..abf146fc 100644 --- a/include/boost/leaf/config.hpp +++ b/include/boost/leaf/config.hpp @@ -210,12 +210,17 @@ //////////////////////////////////////// #ifndef BOOST_LEAF_NODISCARD -# if __cplusplus >= 201703L -# define BOOST_LEAF_NODISCARD [[nodiscard]] -# else -# define BOOST_LEAF_NODISCARD +# if defined(__has_cpp_attribute) +# if __has_cpp_attribute(nodiscard) +# if __cplusplus >= 201703L +# define BOOST_LEAF_NODISCARD [[nodiscard]] +# endif +# endif # endif #endif +#ifndef BOOST_LEAF_NODISCARD +# define BOOST_LEAF_NODISCARD +#endif ////////////////////////////////////////