mirror of
https://github.com/nlohmann/json.git
synced 2026-07-05 18:15:10 +00:00
Add C++17 copies of the test binaries (#3101)
* ⚗️ add C++17 copies of the test binaries * ⚗️ use proper header for filesystem * 🎓 fix warnings * ⚗️ do not use too old compilers with C++17 * ✅ add test * 🤮 add more constraints #3097 * ⚗️ use fix from https://github.com/nlohmann/json/pull/3101#issuecomment-998788786 * ⚗️ use fix from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050 * 👷 use published CI image
This commit is contained in:
@@ -24,6 +24,13 @@ The diagnostics messages can also be controlled with the CMake option `JSON_Diag
|
||||
|
||||
The library targets C++11, but also supports some features introduced in later C++ versions (e.g., `std::string_view` support for C++17). For these new features, the library implements some preprocessor checks to determine the C++ standard. By defining any of these symbols, the internal check is overridden and the provided C++ version is unconditionally assumed. This can be helpful for compilers that only implement parts of the standard and would be detected incorrectly.
|
||||
|
||||
## `JSON_HAS_FILESYSTEM`, `JSON_HAS_EXPERIMENTAL_FILESYSTEM`
|
||||
|
||||
When compiling with C++17, the library provides conversions from and to `std::filesystem::path`. As compiler support
|
||||
for filesystem is limited, the library tries to detect whether `<filesystem>`/`std::filesystem` (`JSON_HAS_FILESYSTEM`)
|
||||
or `<experimental/filesystem>`/`std::experimental::filesystem` (`JSON_HAS_EXPERIMENTAL_FILESYSTEM`) should be used.
|
||||
To override the built-in check, define `JSON_HAS_FILESYSTEM` or `JSON_HAS_EXPERIMENTAL_FILESYSTEM` to `1`.
|
||||
|
||||
## `JSON_NOEXCEPTION`
|
||||
|
||||
Exceptions can be switched off by defining the symbol `JSON_NOEXCEPTION`.
|
||||
|
||||
Reference in New Issue
Block a user