Commit graph

2716 commits

Author SHA1 Message Date
Antonio Borondo
0231059290 Fix warning 2018-10-03 11:27:53 +01:00
Niels Lohmann
9f18e17063
Merge pull request #1270 from chuckatkins/add-more-cmake-docs
docs: Add additional CMake documentation
2018-10-03 10:11:27 +02:00
Niels Lohmann
53ec0a16f3
Merge pull request #1271 from chuckatkins/cleanup-deprecated-warnings
Turn off additional deprecation warnings for GCC.
2018-10-02 22:07:18 +02:00
Chuck Atkins
4c617611e2 docs: Add additional CMake documentation 2018-10-02 14:28:20 -04:00
Chuck Atkins
829571ab5c Turn off additional deprecation warnings for GCC.
In follow up from the conversation in #1269, this adds the
`-Wno-deprecate-declarations` flag to unit tests to allow them to
test deprecated APIs without all the noisy compiler warnings.
This also refactors the setting of build properties for test targets
to use `target_<...>` commands instead of `set_target_properties()`.
2018-10-02 13:01:19 -04:00
Niels Lohmann
c8231eff75
Merge pull request #1260 from chuckatkins/fix-cmake-target-alias
Fix broken cmake imported target alias
2018-10-01 17:44:50 +02:00
Chuck Atkins
02e653bdf7 docs: add a note in the readme about using the CMake imported target 2018-09-30 22:52:54 -04:00
Chuck Atkins
564506a885 cmake: add import config tests 2018-09-30 22:52:47 -04:00
Chuck Atkins
1729db85c1 cmake: fix package config to deal with versioning and namespaces 2018-09-30 09:56:33 -04:00
Niels Lohmann
910a895027
Merge pull request #1238 from theodelrieu/fix/1237
Fix issue #1237
2018-09-29 14:50:54 +02:00
Niels Lohmann
1fae82b7a7
Merge branch 'develop' into fix/1237 2018-09-29 14:50:36 +02:00
Niels Lohmann
22e55349a6
📝 added Wandbox link #1227 2018-09-29 14:33:39 +02:00
Niels Lohmann
70e587c3da
📝 added Wandbox link #1227 2018-09-29 14:33:21 +02:00
Niels Lohmann
d26f39466e
Merge pull request #1231 from theodelrieu/feature/get_with_parameter
Add a get overload taking a parameter.
2018-09-29 14:30:04 +02:00
Niels Lohmann
c61a9071ae
🚨 fixed a compilation issue with ICPC #755
Closes #1222
2018-09-29 11:50:14 +02:00
Niels Lohmann
b59a58406e
Merge branch 'develop' of https://github.com/nlohmann/json into develop 2018-09-29 11:48:52 +02:00
Niels Lohmann
4e54c9a13d
🚨 fixed a compilation issue with ICPC #755
Closes #1222
2018-09-29 11:48:49 +02:00
Niels Lohmann
95432c34f9
Merge pull request #1262 from knilch0r/patch-1
unit-testsuites.cpp: fix hangup if file not found
2018-09-29 10:58:10 +02:00
knilch
8c1387cfb3
unit-testsuites.cpp: fix hangup if file not found
If run from the wrong directory, std::ifstream f("test/data/big-list-of-naughty-strings/blns.json"); will not find the file and thus f.eof() will never return true.
Use canonical C++ file reading loop from https://gehrcke.de/2011/06/reading-files-in-c-using-ifstream-dealing-correctly-with-badbit-failbit-eofbit-and-perror/ instead.
2018-09-28 11:33:23 +02:00
Théo DELRIEU
521fe49fec
Add basic_json::get_to function.
Takes an lvalue reference, and returns the same reference.

This allows non-default constructible types to be converted without
specializing adl_serializer.
This overload does not require CopyConstructible either.

Implements #1227
2018-09-28 11:25:23 +02:00
Niels Lohmann
680a4ab672
Merge pull request #1257 from henryiii/gcc48
GCC 48
2018-09-28 10:05:17 +02:00
Henry Fredrick Schreiner
7a37ba0c02 Adding 4.8 test to travis 2018-09-27 22:31:39 +02:00
Chris Harris
99b7c7c8ef Patch nlohmann/json for GCC 4.8
See https://github.com/nlohmann/json/pull/212 for details
2018-09-25 18:10:20 +02:00
Niels Lohmann
e184b6ecf2
Merge pull request #1252 from koponomarenko/fix-meson-build
Add version and license to meson.build
2018-09-22 14:49:03 +02:00
Niels Lohmann
88b055c2df
Merge pull request #1249 from LEgregius/clang-3.4.2-crash-workaround
#1179 Reordered the code. It seems to stop clang 3.4.2 in RHEL 7 from crash…
2018-09-22 14:14:56 +02:00
Kostiantyn Ponomarenko
8799759b85 Add version and license to meson.build 2018-09-20 21:54:10 +03:00
Théo DELRIEU
4e52277b70
Fix issue #1237
* Make the conversion operator SFINAE correct.
* Workaround a GCC bug with some traits in type_traits.hpp

The first bullet-point implies that every `get`/`get_ptr` be SFINAE
correct as well.
2018-09-20 10:33:14 +02:00
Niels Lohmann
e4bc98d036
Merge pull request #1245 from chuckatkins/fix-target-namespace-backward-compatibility
Use a version check to provide backwards comatible CMake imported target names
2018-09-19 20:46:51 +02:00
David Guthrie
4d780b091b Reordered the code. It seems to stop clang 3.4.2 in RHEL 7 from crashing intermittently. 2018-09-18 16:38:59 -04:00
Chuck Atkins
3b1a5cafad Use a version check to provide backwards comatible imported target names. 2018-09-18 13:59:19 -04:00
Niels Lohmann
99939d6340
📝 added lgtm.com badge
See https://lgtm.com/projects/g/nlohmann/json
2018-09-18 19:27:52 +02:00
Niels Lohmann
4e2f35d4c2
👷 adding Xcode 10 worker
See https://blog.travis-ci.com/2018-09-13-xcode-10-is-now-available?utm_source=twitter&utm_medium=web&utm_campaign=xcode10_gm
2018-09-18 19:22:30 +02:00
Niels Lohmann
7fa3b8865c
Merge pull request #1221 from rivertam/better-error-305
Better error 305
2018-09-18 12:49:07 +02:00
Ben Berman
8f07ab6392 Replace "key-style argument" with "string argument" 2018-09-17 15:36:38 -04:00
Niels Lohmann
186c747a19
Merge pull request #1230 from mandreyel/lambda-unevaluated-context-fix
Move lambda out of unevaluated context
2018-09-10 20:52:11 +02:00
mandreyel
6b5334c167 Move lambda out of unevaluated context 2018-09-10 13:34:59 +02:00
Niels Lohmann
ebb3c03293
🎨 cleanup after #1228 2018-09-09 18:19:33 +02:00
Niels Lohmann
d3428b35c5
Merge pull request #1228 from theodelrieu/remove_static_asserts
Remove static asserts
2018-09-09 18:12:43 +02:00
Théo DELRIEU
aea648bb7a
remove now-useless traits. check for is_basic_json where needed 2018-09-07 14:10:39 +02:00
Théo DELRIEU
4b4bbceebf
make from_json SFINAE-correct 2018-09-07 14:10:37 +02:00
Théo DELRIEU
f7971f04a5
make to_json SFINAE-correct 2018-09-07 12:18:04 +02:00
Théo DELRIEU
f7c8a2145a
refactor from/to_json(CompatibleArrayType) 2018-09-07 12:18:04 +02:00
Théo DELRIEU
628f76729e
do not check for compatible_object_type in compatible_array_type 2018-09-07 12:18:03 +02:00
Théo DELRIEU
29f72966c3
refactor is_compatible_type, remove conjunction & co 2018-09-07 12:18:03 +02:00
Théo DELRIEU
77967e6548
refactor is_compatible_integer_type 2018-09-07 12:18:03 +02:00
Théo DELRIEU
13760857ff
refactor is_compatible_array_type 2018-09-07 12:18:02 +02:00
Théo DELRIEU
924e95c6e8
refactor is_compatible_string_type 2018-09-07 12:18:02 +02:00
Théo DELRIEU
e84195ab7b
refactor is_compatible_object_type 2018-09-07 12:18:02 +02:00
Théo DELRIEU
b59c3367c9
use detected instead of has_* traits 2018-09-07 12:17:59 +02:00
Théo DELRIEU
1ea8cd128c
fix void_t for older compilers 2018-09-07 12:17:33 +02:00