mirror of
https://github.com/boostorg/json.git
synced 2026-02-20 02:42:21 +00:00
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.
This commit is contained in:
@@ -13,17 +13,13 @@
|
||||
#include <boost/json/error.hpp>
|
||||
|
||||
#ifndef BOOST_JSON_STANDALONE
|
||||
#include <boost/version.hpp>
|
||||
#if BOOST_VERSION >= 107300
|
||||
# include <boost/assert/source_location.hpp>
|
||||
#endif
|
||||
#include <boost/assert/source_location.hpp>
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#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;
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user