Skip to content

Commit 9c63229

Browse files
committed
use Charconv library instead of embedded copy
1 parent c02d872 commit 9c63229

30 files changed

+12
-4970
lines changed

.drone.star

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def main(ctx):
2828
linux_cxx("TSan", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'tsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_TSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv, privileged=True),
2929
linux_cxx("GDB printers", "g++-12", packages="g++-12 gdb", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'gdb', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_TARGETS': 'libs/json/test//gdb-printers', 'B2_VARIANT': 'debug', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv),
3030
linux_cxx("gcc 4.8 C++03 (no op)", "g++-4.8", packages="g++-4.8", image=linuxglobalimage, buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "gcc-4.8", "B2_CXXSTD": "03", 'B2_SEPARATE_BOOTSTRAP': '1'}, globalenv=globalenv),
31-
linux_cxx("gcc 4.8", "g++-4.8", packages="g++-4.8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-4.8', 'B2_CXXSTD': '11', 'B2_SEPARATE_BOOTSTRAP': '1', 'DRONE_JOB_UUID': '0ade7c2cf9', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on define=BOOST_JSON_ALLOW_DEPRECATED'}, globalenv=globalenv),
32-
linux_cxx("gcc 4.9", "g++-4.9", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-4.9', 'B2_CXXSTD': '11', 'B2_SEPARATE_BOOTSTRAP': '1', 'DRONE_JOB_UUID': 'b1d5781111', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on define=BOOST_JSON_ALLOW_DEPRECATED'}, globalenv=globalenv),
3331
linux_cxx("gcc 5", "g++-5", packages="g++-5", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-5', 'B2_CXXSTD': '11', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
3432
linux_cxx("gcc 6", "g++-6", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-6', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
3533
linux_cxx("gcc 7", "g++-7", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-7', 'B2_CXXSTD': '14,17', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
@@ -46,7 +44,7 @@ def main(ctx):
4644
linux_cxx("gcc 14", "g++-14", packages="g++-14", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2404:1", environment={'B2_TOOLSET': 'gcc-14', 'B2_CXXSTD': '20'}, globalenv=globalenv),
4745
linux_cxx("Clang 3.8", "clang++-3.8", packages="clang-3.8 g++", llvm_os='xenial', llvm_ver='3.8', buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'B2_TOOLSET': 'clang-3.8', 'B2_CXXSTD': '11', 'B2_SEPARATE_BOOTSTRAP': '1', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv),
4846
linux_cxx("Clang 4.0", "clang++-4.0", packages="clang-4.0 libstdc++-6-dev", llvm_os="xenial", llvm_ver="4.0", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'B2_TOOLSET': 'clang-4.0', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv),
49-
linux_cxx("Clang 5.0", "clang++-5.0", packages="clang-5.0 libstdc++-7-dev", llvm_os="bionic", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-5.0', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv),
47+
linux_cxx("Clang 5.0", "clang++-5.0", packages="clang-5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-5.0', 'B2_CXXSTD': '11,14', 'DRONE_JOB_UUID': '472b07b9fc', 'UBUNTU_TOOLCHAIN_DISABLE': 'true'}, globalenv=globalenv),
5048
linux_cxx("Clang 6.0", "clang++-6.0", packages="clang-6.0 libc6-dbg libstdc++-8-dev", llvm_os="bionic", llvm_ver="6.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXSTD': '14,17', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on linkflags=-lstdc++fs', 'DRONE_JOB_UUID': '12c6fc06c9'}, globalenv=globalenv),
5149
linux_cxx("Clang 7", "clang++-7", packages="clang-7 libstdc++-8-dev", llvm_os="bionic", llvm_ver="7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-7', 'B2_CXXSTD': '17,2a', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on linkflags=-lstdc++fs', 'DRONE_JOB_UUID': 'd435a6cdd7'}, globalenv=globalenv),
5250
linux_cxx("Clang 8", "clang++-8", packages="clang-8 libstdc++-8-dev", llvm_os="bionic", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-8', 'B2_CXXSTD': '17,2a', 'B2_FLAGS': 'warnings=extra warnings-as-errors=on linkflags=-lstdc++fs', 'DRONE_JOB_UUID': '4d134bc072'}, globalenv=globalenv),

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

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,9 @@ in order to support both little endian and big endian platforms.
108108
Boost.JSON has been tested with the following compilers:
109109

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

114-
**Note: support for GCC 4.8 and 4.9 is deprecated and will stop in
115-
Boost 1.88.0.**
116-
117114
### Supported JSON Text
118115

119116
The library expects input text to be encoded using UTF-8, which is a

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
@@ -77,6 +77,7 @@ project
7777
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
7878
: usage-requirements
7979
<library>/boost/container//boost_container/<warnings-as-errors>off
80+
<library>/boost/charconv//boost_charconv/<warnings-as-errors>off
8081
<define>BOOST_JSON_NO_LIB=1
8182
: source-location ../src
8283
;

doc/qbk/overview.qbk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,9 @@ Boost.Endian] in order to support both little endian and big endian platforms.
134134
Boost.JSON has been tested with the following compilers:
135135

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

140-
[important Support for GCC 4.8 and 4.9 is deprecated and will stop in
141-
Boost 1.88.0.]
142-
143140
[heading Supported JSON Text]
144141

145142
The library expects input text to be encoded using UTF-8, which is a

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)