mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03: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:
@ -1031,25 +1031,25 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
|
||||
case value_t::boolean:
|
||||
{
|
||||
boolean = boolean_t(false);
|
||||
boolean = static_cast<boolean_t>(false);
|
||||
break;
|
||||
}
|
||||
|
||||
case value_t::number_integer:
|
||||
{
|
||||
number_integer = number_integer_t(0);
|
||||
number_integer = static_cast<number_integer_t>(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case value_t::number_unsigned:
|
||||
{
|
||||
number_unsigned = number_unsigned_t(0);
|
||||
number_unsigned = static_cast<number_unsigned_t>(0);
|
||||
break;
|
||||
}
|
||||
|
||||
case value_t::number_float:
|
||||
{
|
||||
number_float = number_float_t(0.0);
|
||||
number_float = static_cast<number_float_t>(0.0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1291,10 +1291,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
||||
return it;
|
||||
}
|
||||
|
||||
reference set_parent(reference j, std::size_t old_capacity = std::size_t(-1))
|
||||
reference set_parent(reference j, std::size_t old_capacity = static_cast<std::size_t>(-1))
|
||||
{
|
||||
#if JSON_DIAGNOSTICS
|
||||
if (old_capacity != std::size_t(-1))
|
||||
if (old_capacity != static_cast<std::size_t>(-1))
|
||||
{
|
||||
// see https://github.com/nlohmann/json/issues/2838
|
||||
JSON_ASSERT(type() == value_t::array);
|
||||
|
Reference in New Issue
Block a user