From f52b56d39dfda2ef1cece42682f293887da16f07 Mon Sep 17 00:00:00 2001 From: Dmitry Arkhipov Date: Tue, 26 Jan 2021 09:44:15 +0300 Subject: [PATCH] Don't check Boost version The library was checking if Boost version is not below 1.73. This is an artifact of pre-inclusion to Boost times. Currently in non-standalone mode the library is only supported in Boost versions it is included with, so the check is unnecessary. Moreso, the check caused errors when standalone library was used alongside Boost. --- include/boost/json/detail/except.hpp | 6 +----- include/boost/json/detail/impl/except.ipp | 10 +++++----- test/standalone_with_boost.cpp | 1 + 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/boost/json/detail/except.hpp b/include/boost/json/detail/except.hpp index 6d951f66..08c12d27 100644 --- a/include/boost/json/detail/except.hpp +++ b/include/boost/json/detail/except.hpp @@ -13,17 +13,13 @@ #include #ifndef BOOST_JSON_STANDALONE -#include -#if BOOST_VERSION >= 107300 -# include -#endif +#include #include #endif BOOST_JSON_NS_BEGIN namespace detail { -// VFALCO we are supporting Boost 1.67 because it is in a lot of distros #if ! defined(BOOST_JSON_STANDALONE) && defined(BOOST_CURRENT_LOCATION) # define BOOST_JSON_SOURCE_POS BOOST_CURRENT_LOCATION using source_location = boost::source_location; diff --git a/include/boost/json/detail/impl/except.ipp b/include/boost/json/detail/impl/except.ipp index 3681987a..f7b5ded0 100644 --- a/include/boost/json/detail/impl/except.ipp +++ b/include/boost/json/detail/impl/except.ipp @@ -58,7 +58,7 @@ throw_bad_alloc( (void)loc; throw_exception( std::bad_alloc() -#if BOOST_VERSION >= 107300 +#if ! defined(BOOST_JSON_STANDALONE) , loc #endif ); @@ -72,7 +72,7 @@ throw_length_error( (void)loc; throw_exception( std::length_error(what) -#if BOOST_VERSION >= 107300 +#if ! defined(BOOST_JSON_STANDALONE) , loc #endif ); @@ -86,7 +86,7 @@ throw_invalid_argument( (void)loc; throw_exception( std::invalid_argument(what) -#if BOOST_VERSION >= 107300 +#if ! defined(BOOST_JSON_STANDALONE) , loc #endif ); @@ -100,7 +100,7 @@ throw_out_of_range( throw_exception( std::out_of_range( "out of range") -#if BOOST_VERSION >= 107300 +#if ! defined(BOOST_JSON_STANDALONE) , loc #endif ); @@ -114,7 +114,7 @@ throw_system_error( (void)loc; throw_exception( system_error(ec) -#if BOOST_VERSION >= 107300 +#if ! defined(BOOST_JSON_STANDALONE) , loc #endif ); diff --git a/test/standalone_with_boost.cpp b/test/standalone_with_boost.cpp index 90c92f61..a6a8f6f0 100644 --- a/test/standalone_with_boost.cpp +++ b/test/standalone_with_boost.cpp @@ -8,5 +8,6 @@ // #include +#include #include #include