Merge branch 'develop' into feature/manual_lexer
This commit is contained in:
commit
f47cf152a8
3 changed files with 215 additions and 152 deletions
|
@ -706,6 +706,7 @@ Though it's 2016 already, the support for C++11 is still a bit sparse. Currently
|
||||||
- GCC 4.9 - 6.0 (and possibly later)
|
- GCC 4.9 - 6.0 (and possibly later)
|
||||||
- Clang 3.4 - 3.9 (and possibly later)
|
- Clang 3.4 - 3.9 (and possibly later)
|
||||||
- Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later)
|
- Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later)
|
||||||
|
- Microsoft Visual C++ 2017 / Build Tools 15.1.548.43366 (and possibly later)
|
||||||
|
|
||||||
I would be happy to learn about other compilers/versions.
|
I would be happy to learn about other compilers/versions.
|
||||||
|
|
||||||
|
@ -744,7 +745,7 @@ The following compilers are currently used in continuous integration at [Travis]
|
||||||
| Clang Xcode 8.1 | Darwin Kernel Version 16.1.0 (macOS 10.12.1) | Apple LLVM version 8.0.0 (clang-800.0.42.1) |
|
| Clang Xcode 8.1 | Darwin Kernel Version 16.1.0 (macOS 10.12.1) | Apple LLVM version 8.0.0 (clang-800.0.42.1) |
|
||||||
| Clang Xcode 8.2 | Darwin Kernel Version 16.1.0 (macOS 10.12.1) | Apple LLVM version 8.0.0 (clang-800.0.42.1) |
|
| Clang Xcode 8.2 | Darwin Kernel Version 16.1.0 (macOS 10.12.1) | Apple LLVM version 8.0.0 (clang-800.0.42.1) |
|
||||||
| Visual Studio 14 2015 | Windows Server 2012 R2 (x64) | Microsoft (R) Build Engine version 14.0.25123.0 |
|
| Visual Studio 14 2015 | Windows Server 2012 R2 (x64) | Microsoft (R) Build Engine version 14.0.25123.0 |
|
||||||
|
| Visual Studio 2017 | Windows Server 2016 | Microsoft (R) Build Engine version 15.1.548.43366 |
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -809,7 +810,7 @@ I deeply appreciate the help of the following people.
|
||||||
- [Stefan](https://github.com/5tefan) fixed a minor issue in the documentation.
|
- [Stefan](https://github.com/5tefan) fixed a minor issue in the documentation.
|
||||||
- [Vasil Dimov](https://github.com/vasild) fixed the documentation regarding conversions from `std::multiset`.
|
- [Vasil Dimov](https://github.com/vasild) fixed the documentation regarding conversions from `std::multiset`.
|
||||||
- [ChristophJud](https://github.com/ChristophJud) overworked the CMake files to ease project inclusion.
|
- [ChristophJud](https://github.com/ChristophJud) overworked the CMake files to ease project inclusion.
|
||||||
- [Vladimir Petrigo](https://github.com/vpetrigo) made a SFINAE hack more readable.
|
- [Vladimir Petrigo](https://github.com/vpetrigo) made a SFINAE hack more readable and added Visual Studio 17 to the build matrix.
|
||||||
- [Denis Andrejew](https://github.com/seeekr) fixed a grammar issue in the README file.
|
- [Denis Andrejew](https://github.com/seeekr) fixed a grammar issue in the README file.
|
||||||
- [Pierre-Antoine Lacaze](https://github.com/palacaze) found a subtle bug in the `dump()` function.
|
- [Pierre-Antoine Lacaze](https://github.com/palacaze) found a subtle bug in the `dump()` function.
|
||||||
- [TurpentineDistillery](https://github.com/TurpentineDistillery) pointed to [`std::locale::classic()`](http://en.cppreference.com/w/cpp/locale/locale/classic) to avoid too much locale joggling, found some nice performance improvements in the parser, improved the benchmarking code, and realized locale-independent number parsing and printing.
|
- [TurpentineDistillery](https://github.com/TurpentineDistillery) pointed to [`std::locale::classic()`](http://en.cppreference.com/w/cpp/locale/locale/classic) to avoid too much locale joggling, found some nice performance improvements in the parser, improved the benchmarking code, and realized locale-independent number parsing and printing.
|
||||||
|
@ -893,7 +894,7 @@ $ make json_unit -Ctest
|
||||||
$ ./test/json_unit "*"
|
$ ./test/json_unit "*"
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
All tests passed (11202597 assertions in 47 test cases)
|
All tests passed (11203022 assertions in 48 test cases)
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can use [CMake](https://cmake.org) and run
|
Alternatively, you can use [CMake](https://cmake.org) and run
|
||||||
|
|
342
src/json.hpp
342
src/json.hpp
File diff suppressed because it is too large
Load diff
|
@ -57,3 +57,21 @@ static_assert(noexcept(json(pod{})), "");
|
||||||
static_assert(noexcept(j.get<pod>()), "");
|
static_assert(noexcept(j.get<pod>()), "");
|
||||||
static_assert(not noexcept(j.get<pod_bis>()), "");
|
static_assert(not noexcept(j.get<pod_bis>()), "");
|
||||||
static_assert(noexcept(json(pod{})), "");
|
static_assert(noexcept(json(pod{})), "");
|
||||||
|
|
||||||
|
TEST_CASE("runtime checks")
|
||||||
|
{
|
||||||
|
SECTION("nothrow-copy-constructible exceptions")
|
||||||
|
{
|
||||||
|
// for ERR60-CPP (https://github.com/nlohmann/json/issues/531):
|
||||||
|
// Exceptions should be nothrow-copy-constructible. However, compilers
|
||||||
|
// treat std::runtime_exception differently in this regard. Therefore,
|
||||||
|
// we can only demand nothrow-copy-constructibility for our exceptions
|
||||||
|
// if std::runtime_exception is.
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::exception>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::parse_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::invalid_iterator>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::type_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::out_of_range>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
CHECK(std::is_nothrow_copy_constructible<json::other_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue