Concepts¶
As in the C++20 feature
General concepts¶
-
template<typename T>
concept serializable¶ Type that can be serialized by cronch at the most basic level.
- Requirements
{ metadata<T>::name } -> std::same_as<const char*>
-
template<typename T>
concept has_members¶ Type that can defines fields for use by cronch
- Requirements
{ metadata<T>::members } -> meta::concepts::view
-
template<typename T>
concept meta_complete¶ Type that satisfies all other concepts for meta information
- Requirements
-
template<typename B>
concept serialization_backend¶ Type that can be used as a serialization backend
- Requirements
B::serialize_to(typename B::document_type&, const meta_complete auto&)
-
template<typename B>
concept deserizalation_backend¶ Type that can be used for deserializing
- Requirements
(const B& b, meta_complete auto& v) { b.deserialize_to(v); }
-
template<typename B>
concept backend¶ Type that can be used as a serializing/deserializing backend.
- Requirements
- Implementations
-
template<typename C>
concept iterable¶ Type that can be iterated over
- Requirements
std::begin(c)
std::end(c)
Metadata concepts¶
-
template<typename G>
concept getter¶ A type that acts as a getter to a member of another type
-
template<typename S>
concept setter¶ A type that acts as a setter to a member of another type
-
template<typename A>
concept accessor¶ A type that acts as both a setter and getter for a member of another type