Skip to content

Commit

Permalink
use Charconv library instead of embedded copy
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Dec 14, 2024
1 parent 7f0bceb commit 6ce324f
Show file tree
Hide file tree
Showing 29 changed files with 11 additions and 4,967 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function(boost_json_setup_properties target)
Boost::align
Boost::assert
Boost::config
Boost::charconv
Boost::container
Boost::container_hash
Boost::core
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ in order to support both little endian and big endian platforms.
Boost.JSON has been tested with the following compilers:

* clang: 3.5, 3.6, 3.7, 3.8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
* gcc: 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11, 12
* gcc: 5, 6, 7, 8, 9, 10, 11, 12
* msvc: 14.0, 14.1, 14.2, 14.3

**Note: support for GCC 4.8 and 4.9 is deprecated and will stop in
Boost 1.88.0.**

### Supported JSON Text

The library expects input text to be encoded using UTF-8, which is a
Expand Down
1 change: 1 addition & 0 deletions build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ using boost-pretty-printers ;
constant boost_dependencies :
/boost/align//boost_align
/boost/assert//boost_assert
/boost/charconv//boost_charconv
/boost/config//boost_config
/boost/container//boost_container
/boost/container_hash//boost_container_hash
Expand Down
1 change: 1 addition & 0 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ project
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
: usage-requirements
<library>/boost/container//boost_container/<warnings-as-errors>off
<library>/boost/charconv//boost_charconv/<warnings-as-errors>off
<define>BOOST_JSON_NO_LIB=1
: source-location ../src
;
Expand Down
5 changes: 1 addition & 4 deletions doc/qbk/overview.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,9 @@ Boost.Endian] in order to support both little endian and big endian platforms.
Boost.JSON has been tested with the following compilers:

* clang: 3.8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
* gcc: 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
* gcc: 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
* msvc: 14.0, 14.1, 14.2, 14.3

[important Support for GCC 4.8 and 4.9 is deprecated and will stop in
Boost 1.88.0.]

[heading Supported JSON Text]

The library expects input text to be encoded using UTF-8, which is a
Expand Down
10 changes: 5 additions & 5 deletions include/boost/json/basic_parser_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <boost/json/basic_parser.hpp>
#include <boost/json/error.hpp>
#include <boost/json/detail/buffer.hpp>
#include <boost/json/detail/charconv/from_chars.hpp>
#include <boost/charconv/from_chars.hpp>
#include <boost/json/detail/sse2.hpp>
#include <boost/mp11/algorithm.hpp>
#include <boost/mp11/integral.hpp>
Expand Down Expand Up @@ -2735,11 +2735,11 @@ parse_number(const char* p,
data = num_buf_.append( begin, size );
full_size = num_buf_.size();
}
auto const err = detail::charconv::from_chars(
auto const result = charconv::from_chars_erange(
data, data + full_size, d );
BOOST_ASSERT( err.ec != std::errc::invalid_argument );
BOOST_ASSERT( err.ptr == data + full_size );
(void)err;
BOOST_ASSERT( result.ec != std::errc::invalid_argument );
BOOST_ASSERT( result.ptr == data + full_size );
(void)result;
}
else BOOST_IF_CONSTEXPR( no_parsing )
d = 0;
Expand Down
22 changes: 0 additions & 22 deletions include/boost/json/detail/charconv/chars_format.hpp

This file was deleted.

201 changes: 0 additions & 201 deletions include/boost/json/detail/charconv/detail/compute_float64.hpp

This file was deleted.

59 changes: 0 additions & 59 deletions include/boost/json/detail/charconv/detail/config.hpp

This file was deleted.

Loading

0 comments on commit 6ce324f

Please sign in to comment.