mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
Add to_json() for std::vector<bool>::reference (#3534)
This commit is contained in:
committed by
GitHub
parent
af34396129
commit
9c31d54389
@ -5253,6 +5253,13 @@ inline void to_json(BasicJsonType& j, T b) noexcept
|
||||
external_constructor<value_t::boolean>::construct(j, b);
|
||||
}
|
||||
|
||||
template<typename BasicJsonType,
|
||||
enable_if_t<std::is_convertible<const std::vector<bool>::reference&, typename BasicJsonType::boolean_t>::value, int> = 0>
|
||||
inline void to_json(BasicJsonType& j, const std::vector<bool>::reference& b) noexcept
|
||||
{
|
||||
external_constructor<value_t::boolean>::construct(j, static_cast<typename BasicJsonType::boolean_t>(b));
|
||||
}
|
||||
|
||||
template<typename BasicJsonType, typename CompatibleString,
|
||||
enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0>
|
||||
inline void to_json(BasicJsonType& j, const CompatibleString& s)
|
||||
|
Reference in New Issue
Block a user