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 Mar 19, 2024
1 parent 2b9ad2a commit 55f6d90
Show file tree
Hide file tree
Showing 27 changed files with 13 additions and 5,524 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function(boost_json_setup_properties target)
Boost::align
Boost::assert
Boost::config
Boost::charconv
Boost::container
Boost::container_hash
Boost::core
Expand Down
9 changes: 6 additions & 3 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,26 @@ project boost/json
: source-location ../src
;

local dependencies = container charconv ;
dependencies = <library>/boost//$(dependencies)/<warnings-as-errors>off ;

alias json_deps
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
$(dependencies)
;

alias json_sources
: src.cpp
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
$(dependencies)
;

explicit json_deps json_sources ;

lib boost_json
: json_sources
: usage-requirements
<library>/boost//container/<warnings-as-errors>off
$(dependencies)
;

boost-install boost_json ;
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 @@ -15,7 +15,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 @@ -2769,11 +2769,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 55f6d90

Please sign in to comment.