Commit Graph

12 Commits

Author SHA1 Message Date
Florian Albrechtskirchinger
ccd80c0bd8
Merge 04b4d79ec2 into a8a547d7a2 2022-05-11 17:00:05 +02:00
Qianqian Fang
a8a547d7a2
change bjdata ndarray flag to detect negative size, as part of #3475 (#3479)
* change bjdata ndarray flag to detect negative size, fix https://github.com/nlohmann/json/issues/3475

* fix CI error

* fix CI on 32bit windows

* remove platform specific out_of_range error messages

* Incorporate suggestions from @nlohmann and @falbrechtskirchinger

* fix CI errors

* add coverage

* fix sax event order

* fix coverage
2022-05-10 21:13:24 +02:00
Florian Albrechtskirchinger
bbb33deeef
Disable unit test on MSVC 2015
apply_invoke overload resolution fails for unknown reason.
2022-05-04 11:16:25 +02:00
Florian Albrechtskirchinger
2320e19520
Disable unit test on GCC 8.1
The invoke implemenation does not compile on GCC 8.1.0.
2022-05-04 11:16:25 +02:00
Florian Albrechtskirchinger
f8ddc20d5c
Workaround Clang <3.6 apply_r() runtime failure
Lambdas with certain noexcept specifiers are deemed non-invocable at
compile-time, failing at runtime.
2022-05-04 11:16:25 +02:00
Florian Albrechtskirchinger
f898c19aca
Add apply*() functions (visitor pattern)
Add 3 variants of apply*() functions that invoke a given callable with
the supplied arguments and the stored JSON value.

* void apply(Fn, Args...):
  ...

* void apply_cb(ResultCallback, Fn, Args...):
  ...

* R apply_r(Fn, Args...):
  ...
2022-05-03 21:35:51 +02:00
Florian Albrechtskirchinger
0b0d54d875
Add note about CMake standard version selection to unit tests
Document how CMake chooses which C++ standard version to use when
building tests.
2022-05-02 06:45:15 +02:00
Florian Albrechtskirchinger
da5e454e02
Fix iterators to meet (more) std::ranges requirements
Fixes #3130.
Related discussion: #3408
2022-05-02 06:45:15 +02:00
Florian Albrechtskirchinger
4120c2e01c
Add C++20 3-way comparison operator and fix broken comparisons
Fixes #3207.
Fixes #3409.
2022-05-02 06:45:10 +02:00
Qianqian Fang
b205361d86
Handle invalid BJData optimized type, fix #3461 (#3463)
* Handle invalid BJData optimized type, fix #3461

* Update unit test to handle bjdata optimized array type error
2022-05-01 22:47:06 +02:00
Florian Albrechtskirchinger
bdc21ad1a7
Add build step for ICPC (with fixes) (#3465)
* ⬆️ Doctest 2.4.7

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* ⬇️ downgrade to Doctest 2.4.6

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 👷 add CI step for ICPC

* 🔇 suppress warning #2196: routine is both "inline" and "noinline"

* Re-enable <filesystem> detection on ICPC

* Limit regression test for #3070 to Clang and GCC >=8.4

* Disable deprecation warnings on ICPC

* Disable regression test for #1647 on ICPC (C++20)

* Fix compilation failure of regression test for #3077 on ICPC

* Disable wstring unit test on ICPC

Fixes:
  error 913: invalid multibyte character sequence

* Add ICPC to README

Co-authored-by: Niels Lohmann <mail@nlohmann.me>
2022-05-01 22:46:45 +02:00
Niels Lohmann
b21c345179
Reorganize directories (#3462)
* 🚚 move files
* 🚚 rename doc folder to docs
* 🚚 rename test folder to tests
2022-05-01 09:41:50 +02:00