2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-01 20:42:17 +00:00
Commit Graph

530 Commits

Author SHA1 Message Date
Dmitry Arkhipov
dffb248677 Remove ryu::d2s 2021-05-22 21:19:19 +03:00
Dmitry Arkhipov
a46690714c Fix array constructor from iterators 2021-05-08 15:29:19 +03:00
Dmitry Arkhipov
2ebbd0cfe3 to_number overload takes error 2021-05-08 01:01:45 +03:00
Dogan Ulus
7f43f07465 Use uint64 for integer hashing 2021-05-06 21:29:35 +03:00
Dogan Ulus
1a3c087f44 Small fixes and style improvements 2021-05-06 21:24:26 +03:00
Dogan Ulus
40b7acc199 Add missing BOOST_JSON_DECL declarations 2021-05-06 21:24:26 +03:00
Dogan Ulus
87a93dade5 Add std::hash specializations for json types 2021-05-06 21:24:26 +03:00
Dmitry Arkhipov
aae1863def value_to supports TupleLike types 2021-04-26 03:33:50 +03:00
Dmitry Arkhipov
ae6ca2a0a9 Remove unnecessary inclusion of <tuple> 2021-04-26 03:30:09 +03:00
Dmitry Arkhipov
0d65b0ada0 json::string is convertible to string_view 2021-04-26 03:25:45 +03:00
KoaLaYT
a53e2181d2 object deallocates the correct size 2021-04-25 19:39:39 +03:00
Dmitry Arkhipov
fce0e7b5dd Convert mantissa to double explicitly 2021-03-17 10:42:58 -07:00
Dmitry Arkhipov
3218fe2f09 Fix building on msvc-14.0 2021-03-17 10:42:58 -07:00
Dmitry Arkhipov
1c60f64346 Remove trailing whitespace 2021-03-17 10:42:58 -07:00
Dmitry Arkhipov
e580ace767 value_from supports char const* 2021-03-04 22:08:59 +03:00
Dmitry Arkhipov
964f106f39 Remove trailing whitespace 2021-03-04 21:54:12 +03:00
Dmitry Arkhipov
4de9c6fb6c Use division to compute smaller negative powers of 10 2021-03-01 14:08:11 +03:00
Dmitry Arkhipov
2b422f0a95 Remove trailing whitespace 2021-03-01 14:05:29 +03:00
Dmitry Arkhipov
f52b56d39d Don't check Boost version
The library was checking if Boost version is not below 1.73. This is an
artifact of pre-inclusion to Boost times. Currently in non-standalone mode the
library is only supported in Boost versions it is included with, so the
check is unnecessary. Moreso, the check caused errors when standalone
library was used alongside Boost.
2021-01-27 10:44:27 +03:00
Dmitry Arkhipov
2e876dd250 Add BOOST_JSON_SOURCE_POS
Replaced usage of BOOST_CURRENT_LOCATION with BOOST_JSON_SOURCE_POS.
Using BOOST_CURRENT_LOCATION results in warnings (and could probably
lead to ODR violations) when Json is used standalone, but alongside
Boost.
2021-01-26 20:54:18 +03:00
Dmitry Arkhipov
932b97e5ce Refactor value_from implementation:
fix #481, close #483

Remove internal uses of tag_invoke,
only using it from now on for user
customizations.
2021-01-12 15:10:14 -08:00
Vinnie Falco
9e67899cd5 Support standalone shared libraries
fix #467
2020-11-17 16:57:22 -08:00
Richard Hodges
21cdb11346 Fix value_to and value_from for MSVC-14.0:
close #465

value_to and value_from was incorrectly deducing that std::string was
"array-like" rather than "string-like", but only on msvc-14.0

Original test:

template<class T, typename std::enable_if<
    std::is_constructible<remove_cvref<T>, const char*, std::size_t>::value &&
    std::is_convertible<decltype(std::declval<T&>().data()), const char*>::value &&
    std::is_convertible<decltype(std::declval<T&>().size()), std::size_t>::value
>::type* = nullptr>

Which works for all compilers except msvc-14.0

New test:

template<class T, typename std::enable_if<
    std::is_constructible<remove_cvref<T>, const char*, std::size_t>::value &&
    std::is_convertible<decltype(std::declval<T&>().data()), const char*>::value &&
    std::is_integral<decltype(std::declval<T&>().size())>::value
>::type* = nullptr>

Note that each individual test works on all compilers. It seems to be
the conjuction of tests that caused msvc-14 to trip up.
2020-11-17 16:57:22 -08:00
Vinnie Falco
38c31a1812 Safer shared library behavior:
This solves a problem where there is more than
one instance of the library loaded into the process
and objects are shared across module boundaries.
2020-11-17 11:44:10 -08:00
Vinnie Falco
499ef7d4b1 Revert "Add value::is_integral"
This reverts commit 099a82957a.
2020-11-17 11:44:10 -08:00
Vinnie Falco
099a82957a Add value::is_integral 2020-11-16 10:18:48 -08:00
Vinnie Falco
ee8d72d850 Fix value to_number warning for lossy conversion 2020-11-03 19:23:36 -08:00
Vinnie Falco
1d79785653 Use static cast instead of dynamic cast 2020-10-30 15:57:47 -07:00
Vinnie Falco
6f4cead649 Remove UB in storage_ptr 2020-10-30 14:45:14 -07:00
Vinnie Falco
74fb1effd1 Squelch class dllexport warning 2020-10-30 10:50:15 -07:00
Krystian Stasiowski
3a39b8cf9f Fix out-of-bounds warning on g++11 2020-10-30 10:50:15 -07:00
Krystian Stasiowski
c036f3db9c Fix implicit floating-point conversion warnings 2020-10-30 10:50:15 -07:00
Krystian Stasiowski
f29fe71de5 Refactor CI 2020-10-29 13:26:12 -07:00
Vinnie Falco
52f1d0b30b Small object uses linear search 2020-10-27 14:42:36 -07:00
Krystian Stasiowski
2b074ee053 value_to/from don't use user-provided conversion functions 2020-10-27 14:03:52 -07:00
Vinnie Falco
c02fd6339a object::at is inline 2020-10-25 13:45:17 -07:00
Peter Dimov
2e9366a2d6 Remove use of std::pow from pow10/dec_to_float 2020-10-24 12:12:48 -07:00
Vinnie Falco
b4e40998e5 digest is inline 2020-10-23 11:39:37 -07:00
Richard Hodges
bfc8665d6d Fix visit for const values 2020-10-22 20:53:43 +02:00
Richard Hodges
3f2fb68be5 Improved tests for string to double
close #447
2020-10-21 11:39:30 -07:00
Vinnie Falco
9d27d48cad Initialize pad for constexpr construction 2020-10-21 11:33:31 -07:00
Krystian Stasiowski
980ae37dbc Fix msvc anonymous union member lookup bug 2020-10-21 09:54:42 -07:00
Krystian Stasiowski
d5d2dfd648 Use alignas(T) over alignas(alignof(T)) 2020-10-21 09:54:42 -07:00
Vinnie Falco
eff84d5b7f Avoid digraphs 2020-10-21 08:15:22 -07:00
Vinnie Falco
37cb1b4d90 No redundant checks building objects
fix #231
2020-10-16 13:12:42 -07:00
Vinnie Falco
18a50dae83 Better decimal to float accuracy 2020-10-09 10:22:59 -07:00
Vinnie Falco
844851c6ab Refactor object 2020-10-09 10:15:02 -07:00
Vinnie Falco
1b5a00e968 Return storage_ptr by reference 2020-10-08 14:05:37 -07:00
Maximilian Riemensberger
9a42dbbaab Use relaxed increment and acquire_release decrement for atomic reference counts 2020-10-08 14:04:26 -07:00
Richard Hodges
ff6a090680 Fix parsing of double with >16 mantissa digits 2020-10-08 14:01:59 -07:00