Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user‐provided conversion.
Synopsis
Declared in <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>;
};
Description
This concept determines if the user‐provided conversion is defined as:
template <class IO>
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 <class IO>
void tag_invoke( LazyObjectMapTag, IO& io, MyStruct const& s)
{
io.map("name", s.name);
io.map("size", s.size);
io.map("age", s.age);
}
Created with MrDocs