Skip to content

Commit 65936e7

Browse files
committed
use Charconv library instead of embedded copy
1 parent 37e3fd0 commit 65936e7

27 files changed

+13
-5524
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ function(boost_json_setup_properties target)
7474
Boost::align
7575
Boost::assert
7676
Boost::config
77+
Boost::charconv
7778
Boost::container
7879
Boost::container_hash
7980
Boost::core

build/Jamfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,26 @@ project boost/json
7777
: source-location ../src
7878
;
7979

80+
local dependencies = container charconv ;
81+
dependencies = <library>/boost//$(dependencies)/<warnings-as-errors>off ;
82+
8083
alias json_deps
8184
: usage-requirements
82-
<library>/boost//container/<warnings-as-errors>off
85+
$(dependencies)
8386
;
8487

8588
alias json_sources
8689
: src.cpp
8790
: usage-requirements
88-
<library>/boost//container/<warnings-as-errors>off
91+
$(dependencies)
8992
;
9093

9194
explicit json_deps json_sources ;
9295

9396
lib boost_json
9497
: json_sources
9598
: usage-requirements
96-
<library>/boost//container/<warnings-as-errors>off
99+
$(dependencies)
97100
;
98101

99102
boost-install boost_json ;

include/boost/json/basic_parser_impl.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <boost/json/basic_parser.hpp>
1616
#include <boost/json/error.hpp>
1717
#include <boost/json/detail/buffer.hpp>
18-
#include <boost/json/detail/charconv/from_chars.hpp>
18+
#include <boost/charconv/from_chars.hpp>
1919
#include <boost/json/detail/sse2.hpp>
2020
#include <boost/mp11/algorithm.hpp>
2121
#include <boost/mp11/integral.hpp>
@@ -2769,11 +2769,11 @@ parse_number(const char* p,
27692769
data = num_buf_.append( begin, size );
27702770
full_size = num_buf_.size();
27712771
}
2772-
auto const err = detail::charconv::from_chars(
2772+
auto const result = charconv::from_chars_erange(
27732773
data, data + full_size, d );
2774-
BOOST_ASSERT( err.ec != std::errc::invalid_argument );
2775-
BOOST_ASSERT( err.ptr == data + full_size );
2776-
(void)err;
2774+
BOOST_ASSERT( result.ec != std::errc::invalid_argument );
2775+
BOOST_ASSERT( result.ptr == data + full_size );
2776+
(void)result;
27772777
}
27782778
else BOOST_IF_CONSTEXPR( no_parsing )
27792779
d = 0;

include/boost/json/detail/charconv/chars_format.hpp

-22
This file was deleted.

include/boost/json/detail/charconv/detail/compute_float64.hpp

-201
This file was deleted.

include/boost/json/detail/charconv/detail/config.hpp

-59
This file was deleted.

0 commit comments

Comments
 (0)