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
Vinnie Falco
8f26e86b2f
Don't destroy in object_impl::build
2020-10-06 13:05:47 -07:00
Vinnie Falco
0a905acf9d
Tidy up pilfering
2020-10-06 11:59:58 -07:00
Vinnie Falco
dd338e299e
Update natvis
2020-10-06 11:38:58 -07:00
Vinnie Falco
018a5b555d
Use static_cast
2020-10-05 16:35:32 -07:00
Vinnie Falco
ca9e94c490
Tidy up to_number
2020-10-05 16:16:48 -07:00
Vinnie Falco
1149030797
Tidy up inlining
...
fix #442
2020-10-05 15:47:34 -07:00
Vinnie Falco
2032232f9e
value::to_number replaces number_cast
2020-10-05 13:17:13 -07:00
Vinnie Falco
592783499e
Tidy up value and tests
2020-10-05 11:44:13 -07:00
Vinnie Falco
0c0c423e05
constinit is on the definition
2020-10-05 11:01:46 -07:00
Vinnie Falco
b68d325a8b
Include ostream
2020-10-05 08:36:18 -07:00
Vinnie Falco
94d11a74e6
Refactor storage_ptr (API Change)
2020-10-04 19:07:58 -07:00
Vinnie Falco
8faf950b79
storage_ptr thread safety doc and tidy
...
fix #391
2020-10-04 18:46:01 -07:00
Vinnie Falco
6f895a79cc
Refactor basic_parser includes
...
fix #424
2020-10-04 18:30:22 -07:00
Vinnie Falco
e1140a9847
Better construction of keys
...
fix #426
2020-10-04 18:26:25 -07:00
Vinnie Falco
996c8958fe
Add visit
...
fix #207
2020-10-04 11:22:29 -07:00
Vinnie Falco
a2c1b7e9e5
monotonic_resource has an upstream
...
fix #365
2020-10-04 11:21:55 -07:00
Vinnie Falco
1b73c77822
static and monotonic resource tests, fixes:
...
fix #419
* monotonic_resource::release correctly resets
the buffer list.
2020-10-04 11:21:55 -07:00
Vinnie Falco
0fd1d1a9a7
basic_parser::depth is private
...
fix #430
2020-10-04 11:21:55 -07:00