Skip to content

Commit 01e6836

Browse files
committed
use Charconv library instead of embedded copy
1 parent 3c80c09 commit 01e6836

28 files changed

+9
-5522
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function(boost_json_setup_properties target)
8888
Boost::align
8989
Boost::assert
9090
Boost::config
91+
Boost::charconv
9192
Boost::container
9293
Boost::container_hash
9394
Boost::core

build.jam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ using boost-pretty-printers ;
1313
constant boost_dependencies :
1414
/boost/align//boost_align
1515
/boost/assert//boost_assert
16+
/boost/charconv//boost_charconv
1617
/boost/config//boost_config
1718
/boost/container//boost_container
1819
/boost/container_hash//boost_container_hash

build/Jamfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ project
5050
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
5151
: usage-requirements
5252
<library>/boost/container//boost_container/<warnings-as-errors>off
53+
<library>/boost/charconv//boost_charconv/<warnings-as-errors>off
5354
<define>BOOST_JSON_NO_LIB=1
5455
: source-location ../src
5556
;

include/boost/json/basic_parser_impl.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <boost/json/basic_parser.hpp>
1717
#include <boost/json/error.hpp>
1818
#include <boost/json/detail/buffer.hpp>
19-
#include <boost/json/detail/charconv/from_chars.hpp>
19+
#include <boost/charconv/from_chars.hpp>
2020
#include <boost/json/detail/sse2.hpp>
2121
#include <boost/mp11/algorithm.hpp>
2222
#include <boost/mp11/integral.hpp>
@@ -2735,11 +2735,11 @@ parse_number(const char* p,
27352735
data = num_buf_.append( begin, size );
27362736
full_size = num_buf_.size();
27372737
}
2738-
auto const err = detail::charconv::from_chars(
2738+
auto const result = charconv::from_chars_erange(
27392739
data, data + full_size, d );
2740-
BOOST_ASSERT( err.ec != std::errc::invalid_argument );
2741-
BOOST_ASSERT( err.ptr == data + full_size );
2742-
(void)err;
2740+
BOOST_ASSERT( result.ec != std::errc::invalid_argument );
2741+
BOOST_ASSERT( result.ptr == data + full_size );
2742+
(void)result;
27432743
}
27442744
else BOOST_IF_CONSTEXPR( no_parsing )
27452745
d = 0;

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

Lines changed: 0 additions & 22 deletions
This file was deleted.

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

Lines changed: 0 additions & 201 deletions
This file was deleted.

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

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)