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

Regular keyword. More...

#include <raberu/impl/keywords.hpp>

Detailed Description

template<typename ID>
struct rbr::any_keyword< ID >

Regular keyword.

A Regular keyword is a keyword that accepts any types.

Template Parameters
IDUnique identifier for the keyword

Public Types

using id_type = ID
 ID type associated to the keyword.
 
using tag_type = any_keyword< ID >
 Derived keyword type.
 

Public Member Functions

constexpr decltype(auto) operator() (Os &&... o) const
 Keyword fetching from options set.
 
constexpr auto operator<=> (as_keyword const &) const noexcept=default
 Keyword comparison.
 
constexpr auto operator| (call< Func > &&v) const noexcept
 Specify a Callable object as a default value for the keyword.
 
constexpr auto operator| (Type &&v) const noexcept
 Specify a default value for the keyword.
 
std::ostream & show (std::ostream &os, V const &v) const
 Stream insertion function.
 

Static Public Member Functions

static constexpr bool accept ()
 Compile-time validation of value.
 

Related Functions

(Note that these are not member functions.)

template<typename ID >
constexpr any_keyword< ID > keyword (ID id) noexcept
 Create a regular keyword for reuse.
 
template<str ID>
constexpr auto operator""_kw () noexcept
 Forms an instance of rbr::any_keyword from a literal string.