🚨 fix -fpermissive warnings

This commit is contained in:
Niels Lohmann 2021-11-03 21:25:46 +01:00
parent 2e66720982
commit 5663bfa6c6
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -4707,9 +4707,12 @@ std::string to_string(const NLOHMANN_BASIC_JSON_TPL& j)
// nonmember support //
///////////////////////
namespace std
{
/// hash value for JSON objects
NLOHMANN_BASIC_JSON_TPL_DECLARATION
struct std::hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>
struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>
{
/*!
@brief return a hash value for a JSON object
@ -4726,7 +4729,7 @@ struct std::hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>
/// @note: do not remove the space after '<',
/// see https://github.com/nlohmann/json/pull/679
template<>
struct std::less< ::nlohmann::detail::value_t>
struct less< ::nlohmann::detail::value_t>
{
/*!
@brief compare two value_t enum values
@ -4742,9 +4745,6 @@ struct std::less< ::nlohmann::detail::value_t>
// C++20 prohibit function specialization in the std namespace.
#ifndef JSON_HAS_CPP_20
namespace std
{
/*!
@brief exchanges the values of two JSON objects
@ -4758,10 +4758,10 @@ inline void swap<nlohmann::json>(nlohmann::json& j1, nlohmann::json& j2) noexcep
j1.swap(j2);
}
} // namespace std
#endif
} // namespace std
/// @brief user-defined string literal for JSON values
/// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/
JSON_HEDLEY_NON_NULL(1)