From 830192fc350cc64d8360547865fc32e6a0026980 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 3 Sep 2016 12:37:06 +0300 Subject: [PATCH] Detect [[noreturn]] attribute --- include/boost/config/suffix.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 17bf1020..cea466e5 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -624,6 +624,10 @@ namespace std{ using ::type_info; } # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) +# elif defined(__has_cpp_attribute) +# if __has_cpp_attribute(noreturn) +# define BOOST_NORETURN [[noreturn]] +# endif # else # define BOOST_NO_NORETURN # define BOOST_NORETURN