Checked keyword. More...
#include <raberu/impl/keywords.hpp>
Checked keyword.
A Checked keyword is a keyword that verify if a value's type satisfies a predicates before binding it
ID | Unique identifier for the keyword |
Checker | Unary template meta-function acting as predicate |
Public Types | |
using | tag_type = checked_keyword< ID, Checker > |
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<template< class > class Checker, typename ID > | |
constexpr checked_keyword< ID, Checker > | keyword (ID id) noexcept |
Create a checked keyword for reuse. | |