Jaakko Moisio
467f622c65
Fix compilation of input_adapter(container) in edge cases
...
This fixes a compilation issue with the library if trying to use containers that
don't have non-member `begin()` and `end()` functions via ADL.
This patch extends the `using std::begin` and `using std::end` declarations to
also cover the return type deduction of the input_adapter() template
specialization for containers. The previous implementation only enabled the
detection of `std::begin()` and `std::end()` in the function body, making the
specialization unusable for container types that only have member `begin()` and
`end()` functions.
It is not typical to have `using` declarations in the namespace scope in a
header file. But a C++11 implementation can't rely on fully automatic return
type deduction, and needs to rely on ADL enabled helper templates. To prevent
the using declarations leaking, they are enclosed in another nested namespace.
2020-12-28 22:21:02 +01:00
Niels Lohmann
f15d447522
🚨 fix warnings
2020-12-26 14:55:19 +01:00
Alexander Karzhenkov
cd7acc1dc5
Include <string_view> in "nlohmann/json.hpp" when C++17 is used
2020-12-20 19:40:36 +05:00
Alexander Karzhenkov
39b8d6bd33
Restore intentionally disrupted C++17 tests
2020-12-20 12:43:35 +05:00
Alexander Karzhenkov
8247a217bb
Disrupt all C++17 tests to check if they are executed
2020-12-19 18:58:49 +05:00
Krylov Yaroslav
a1772743a1
Doctest is updated to v2.4.3
2020-12-18 07:27:22 +03:00
Niels Lohmann
c026e1a475
🚨 fix warnings
2020-12-16 21:44:35 +01:00
Krylov Yaroslav
6390fca71a
Doctest is updated to v2.4.1
2020-12-12 05:27:03 +03:00
Krylov Yaroslav
972c15f26e
ordered_map::insert(InputIt first, InputIt last) is added
2020-12-07 20:15:41 +03:00
Krylov Yaroslav
5155cc2c48
Ranged insert test section is added in unit-ordered_json.cpp
2020-12-07 19:47:41 +03:00
Niels Lohmann
9d726c25d5
♻️ remove "#define private public"
2020-08-12 13:30:06 +02:00
Niels Lohmann
4080d0b1a4
✅ add test to compile without exceptions
2020-08-10 09:48:11 +02:00
Niels Lohmann
b3e5cb7f20
🔖 set version to 3.9.1
2020-08-06 13:45:29 +02:00
Niels Lohmann
3888b1642a
🐛 fix lexer to properly cope with repeated comments #2330
2020-07-31 18:59:22 +02:00
Niels Lohmann
2326abc547
♻️ split regression tests
2020-07-30 12:13:05 +02:00
Niels Lohmann
f13af83a94
🐛 add more functions from std::map to nlohmann::ordered_map
2020-07-28 21:47:06 +02:00
Niels Lohmann
e590604822
🐛 fix a bug due to missing overloads in ordered_map container
2020-07-28 14:20:31 +02:00
Niels Lohmann
e110667d21
🔖 set version to 3.9.0
2020-07-27 15:48:09 +02:00
Niels Lohmann
e22cbacc41
🚨 fix warning
2020-07-26 12:12:17 +02:00
Niels Lohmann
67ed63b196
Merge pull request #2312 from nlohmann/docs
...
Update documentation
2020-07-26 10:06:01 +02:00
Niels Lohmann
a34070d36a
✅ fix test for meta() function
2020-07-25 22:28:14 +02:00
Niels Lohmann
42f8708940
Merge branch 'develop' of https://github.com/nlohmann/json into issue2286
...
Conflicts:
single_include/nlohmann/json.hpp
2020-07-25 21:44:58 +02:00
Niels Lohmann
40b78d3847
Merge pull request #2308 from nlohmann/cbor_tags
...
Fix bug in CBOR tag handling
2020-07-25 19:43:11 +02:00
Niels Lohmann
448ceb2e12
Merge pull request #2303 from nlohmann/cleanup
...
Cleanup
2020-07-25 05:41:51 +02:00
Niels Lohmann
480ad529e3
🐛 fix bug in CBOR tag handling
2020-07-24 14:18:39 +02:00
Niels Lohmann
33662417c1
✅ improve coverage
2020-07-24 09:32:03 +02:00
Niels Lohmann
0cd120f7e1
🚨 fix UBSAN warning
2020-07-23 14:06:09 +02:00
Niels Lohmann
bba57cc4af
🚨 fix UBSAN warning
2020-07-23 14:02:49 +02:00
Niels Lohmann
e571c67c0d
🚨 fix implicit conversion warning when opening binary file
2020-07-23 14:02:12 +02:00
Niels Lohmann
43e07bb92d
Merge pull request #2301 from nlohmann/regression2281
...
Add test with multiple translation units
2020-07-23 13:14:24 +02:00
Niels Lohmann
8159091d8f
🔀 rename variable to avoid shadowing
2020-07-23 12:58:09 +02:00
Niels Lohmann
a33c3fdf25
Merge branch 'develop' of https://github.com/nlohmann/json into issue2286
...
Conflicts:
single_include/nlohmann/json.hpp
2020-07-23 12:30:07 +02:00
Niels Lohmann
a048b72fe1
Merge pull request #1559 from theodelrieu/feat/explicit_conversion_operator
...
Feat/explicit conversion operator
2020-07-23 08:52:51 +02:00
Niels Lohmann
a6d112ffbf
✅ add regression test for #2281
2020-07-22 13:39:40 +02:00
Niels Lohmann
2301bd1177
✅ add regression test for #2281
2020-07-22 13:24:07 +02:00
Niels Lohmann
c4356c68e0
✅ add regression test for #2281
2020-07-22 12:38:39 +02:00
Niels Lohmann
4d63252c6c
✅ add regression test for #2281
2020-07-22 12:23:58 +02:00
Niels Lohmann
a7c4c84d68
✅ add regression test for #2281
2020-07-22 12:03:37 +02:00
Théo DELRIEU
74b446f5fd
add a switch to enable implicit conversions (defaults to true)
...
wrap implicit conversions tests around the JSON_USE_IMPLICIT_CONVERSIONS
macro
2020-07-22 10:49:01 +02:00
Niels Lohmann
8b14c9b305
🚨 fix warnings
2020-07-21 23:00:56 +02:00
Niels Lohmann
3249a4d821
Merge branch 'develop' of https://github.com/nlohmann/json into issue2286
...
Conflicts:
single_include/nlohmann/json.hpp
2020-07-21 22:01:32 +02:00
Niels Lohmann
96e9f66025
🔇 remove debug output
2020-07-21 22:01:15 +02:00
Niels Lohmann
8046754c15
🔊 add debug output to tests
2020-07-21 12:44:38 +02:00
Niels Lohmann
a9117828e1
🚨 fix warnings
2020-07-20 22:38:00 +02:00
Niels Lohmann
8344857764
Merge pull request #2287 from pfeatherstone/develop
...
Serialisation macros: increase upper bound on number of member variables
2020-07-20 21:35:55 +02:00
Niels Lohmann
8aa6da61dc
🚧 support for UBJSON high-precision numbers #2286
2020-07-20 13:57:19 +02:00
Niels Lohmann
7360e09830
🚧 support for UBJSON high-precision numbers #2286
2020-07-20 13:12:20 +02:00
pf
35b899e988
[JSON] initialise all member variables. Maybe this will shut valgrind up. std::tie probably wasn't the problem initially
2020-07-20 10:51:43 +01:00
Niels Lohmann
7cf2fe149c
🚧 support for UBJSON high-precision numbers #2286
2020-07-20 09:42:37 +02:00
pf
7660ea12f6
[JSON] drop use of std::tie and std::tupe for operator== overload. valgrind and clang < 4 complain
2020-07-20 08:31:56 +01:00