mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Fix C++20/gcc-12 issues (Part 1) (#3379)
* 🔧 use proper GCC binary * 🔧 add more GCC warning flags * ⚗️ try fix from https://github.com/nlohmann/json/issues/3138#issuecomment-1015562666 * Fix custom allocator test build failures (C++20) Allocator tests fail to compile in C++20 mode with clang+MS STL due to missing copy constructors. * Fix test build failures due to missing noexcept (gcc-12) * alt_string has multiple member functions that should be marked noexcept. * nlohmann::ordered_map constructors can be noexcept. Compilation failures result from the warning flag -Werror=noexcept and gcc-12. * Disable broken comparison tests in C++20 mode Co-authored-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
committed by
GitHub
parent
4a6e6ca8c7
commit
f208a9c19b
@ -1872,6 +1872,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
template < typename ValueType, typename std::enable_if <
|
||||
detail::conjunction <
|
||||
detail::negation<std::is_pointer<ValueType>>,
|
||||
detail::negation<std::is_same<ValueType, std::nullptr_t>>,
|
||||
detail::negation<std::is_same<ValueType, detail::json_ref<basic_json>>>,
|
||||
detail::negation<std::is_same<ValueType, typename string_t::value_type>>,
|
||||
detail::negation<detail::is_basic_json<ValueType>>,
|
||||
|
Reference in New Issue
Block a user