dom::LazyObjectImpl
with a user-provided conversion.
<mrdocs/Dom/LazyObject.hpp>
template<class T>
concept HasLazyObjectMapWithoutContext = requires(
detail::ArchetypalIO& io,
T const& t)
{
{ tag_invoke(LazyObjectMapTag{}, io, t) } -> std::same_as<void>;
};
This concept determines if the user-provided conversion is defined as:
template
void tag_invoke( LazyObjectMapTag, IO&, T& );
This customization can be defined by any type that needs to be converted to/from a lazy dom::Object
. For example:
template
void tag_invoke( LazyObjectMapTag, IO& io, MyStruct const& s)
{
io.map("name", s.name);
io.map("size", s.size);
io.map("age", s.age);
}