🚨 fix warning

This commit is contained in:
Niels Lohmann 2021-03-23 13:10:13 +01:00
parent 1e08af816d
commit fc38454a22
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 14 additions and 6 deletions

View File

@ -1247,10 +1247,14 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
#if JSON_DIAGNOSTICS
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
try
{
return j.m_parent == this;
}));
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
{
return j.m_parent == this;
}));
}
catch (..) {}
#else
static_cast<void>(check_parents);
#endif

View File

@ -18060,10 +18060,14 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_ASSERT(m_type != value_t::binary || m_value.binary != nullptr);
#if JSON_DIAGNOSTICS
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
try
{
return j.m_parent == this;
}));
JSON_ASSERT(!check_parents || !is_structured() || std::all_of(begin(), end(), [this](const basic_json & j)
{
return j.m_parent == this;
}));
}
catch (..) {}
#else
static_cast<void>(check_parents);
#endif