🚨 fix warnings

This commit is contained in:
Niels Lohmann 2021-01-28 16:02:48 +01:00
parent bfcbb43b7e
commit bdcabc05d1
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ Checks: '*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-union-access,
-fuchsia-default-arguments-calls,
-fuchsia-default-arguments-declarations,

View File

@ -161,7 +161,7 @@ void from_json(const BasicJsonType& j, std::valarray<T>& l)
}
template<typename BasicJsonType, typename T, std::size_t N>
auto from_json(const BasicJsonType& j, T (&arr)[N])
auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays)
-> decltype(j.template get<T>(), void())
{
for (std::size_t i = 0; i < N; ++i)

View File

@ -35,7 +35,7 @@ class json_ref
{}
// class should be movable only
json_ref(json_ref&&) = default;
json_ref(json_ref&&) noexcept = default;
json_ref(const json_ref&) = delete;
json_ref& operator=(const json_ref&) = delete;
json_ref& operator=(json_ref&&) = delete;