raberu v1.1.0
Fancy Named Parameter Library
 
Loading...
Searching...
No Matches
rbr::as_keyword< Keyword > Struct Template Reference

Base class for keyword definition. More...

#include <raberu/impl/keywords.hpp>

Detailed Description

template<typename Keyword>
struct rbr::as_keyword< Keyword >

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.

Template Parameters
KeywordKeyword 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.