mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
[Build] Make it work on Linux (#1)
This commit is contained in:
parent
780bf06715
commit
94ca772cc7
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user