Sygaldry
Loading...
Searching...
No Matches
sygac-metadata: Text Metadata Reflection

Macros

#define text_concept(CONCEPT_NAME)
 

Functions

 sygaldry::text_concept (name)
 
 sygaldry::text_concept (author)
 
 sygaldry::text_concept (email)
 
 sygaldry::text_concept (license)
 
 sygaldry::text_concept (description)
 
 sygaldry::text_concept (uuid)
 
 sygaldry::text_concept (unit)
 
 sygaldry::text_concept (version)
 
 sygaldry::text_concept (date)
 

Detailed Description

Macro Definition Documentation

◆ text_concept

#define text_concept (   CONCEPT_NAME)
Value:
template<typename T> \
concept has_##CONCEPT_NAME = requires \
{ \
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<std::string>; \
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<std::string_view>; \
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<const char *>; \
}; \
template<has_##CONCEPT_NAME T> \
constexpr auto CONCEPT_NAME##_of(const T&) { return T::CONCEPT_NAME(); } \
\
template<has_##CONCEPT_NAME T> \
_consteval auto CONCEPT_NAME##_of() { return std::decay_t<T>::CONCEPT_NAME(); }