[Build] Make it work on Linux (#1)

This commit is contained in:
yekuang 2023-06-07 22:52:25 +08:00 committed by GitHub
parent 780bf06715
commit 94ca772cc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -553,14 +553,7 @@ public:
*
* Otherwise it will return an empty optional.
*/
opt::optional<NlohmannJsonObject> getObjectOptional() const
{
if (m_value.is_object()) {
return opt::make_optional(NlohmannJsonObject(m_value));
}
return {};
}
opt::optional<NlohmannJsonObject> getObjectOptional() const;
/**
* @brief Retrieve the number of members in the object
@ -679,6 +672,17 @@ public:
}
};
template <class ValueType>
opt::optional<NlohmannJsonObject>
NlohmannJsonValue<ValueType>::getObjectOptional() const
{
if (m_value.is_object()) {
return opt::make_optional(NlohmannJsonObject(m_value));
}
return {};
}
/// Specialisation of the AdapterTraits template struct for NlohmannJsonAdapter.
template<>
struct AdapterTraits<valijson::adapters::NlohmannJsonAdapter>