Enable noexcept qualifier for error categories when using recent versions of boost.
diff --git a/asio/boostify.pl b/asio/boostify.pl index e4b6dd0..144b1ca 100755 --- a/asio/boostify.pl +++ b/asio/boostify.pl
@@ -121,10 +121,6 @@ { $line =~ s/asio_detail_posix_thread_function/boost_asio_detail_posix_thread_function/g; } - if ($line =~ /const ASIO_ERROR_CATEGORY_NOEXCEPT$/) - { - $line =~ s/ ASIO_ERROR_CATEGORY_NOEXCEPT$//; - } if ($line =~ /ASIO_/ && !($line =~ /BOOST_ASIO_/)) { $line =~ s/ASIO_/BOOST_ASIO_/g;
diff --git a/asio/include/asio/detail/config.hpp b/asio/include/asio/detail/config.hpp index c088033..bbd2865 100644 --- a/asio/include/asio/detail/config.hpp +++ b/asio/include/asio/detail/config.hpp
@@ -114,7 +114,9 @@ // Compliant C++11 compilers put noexcept specifiers on error_category members. #if !defined(ASIO_ERROR_CATEGORY_NOEXCEPT) -# if defined(__GNUC__) +# if (BOOST_VERSION >= 105300) +# define ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT +# elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)