Base class for keyword definition. More...
#include <raberu/impl/keywords.hpp>
Base class for keyword definition.
rbr::as_keyword provides an CRTP base class for keyword-like types. It is internally used to provide specific keyword constructors but can be used to define user-defined keyword.
Keyword | Keyword type being defined |
Public Types | |
using | tag_type = Keyword |
Derived keyword type. | |
Public Member Functions | |
template<concepts::option... Os> | |
constexpr decltype(auto) | operator() (Os &&... o) const |
Keyword fetching from options set. | |
constexpr auto | operator<=> (as_keyword const &) const noexcept=default |
Keyword comparison. | |
template<typename Type > requires ( accept<Type>() ) | |
constexpr auto | operator= (Type &&v) const noexcept |
Assignment of a value to a keyword. | |
template<typename Func > | |
constexpr auto | operator| (call< Func > &&v) const noexcept |
Specify a Callable object as a default value for the keyword. | |
template<typename Type > requires ( accept<Type>() ) | |
constexpr auto | operator| (Type &&v) const noexcept |
Specify a default value for the keyword. | |
template<typename V > | |
std::ostream & | show (std::ostream &os, V const &v) const |
Stream insertion function. | |
Static Public Member Functions | |
template<typename T > | |
static constexpr bool | accept () |
Compile-time validation of value. | |