raberu v1.1.0
Fancy Named Parameter Library
 
Loading...
Searching...
No Matches

◆ keyword()

template<template< class > class Checker, typename ID >
constexpr checked_keyword< ID, Checker > keyword ( ID  id)
related

Create a checked keyword for reuse.

Template Parameters
CheckerUnary template meta-function to use for validation
Parameters
idUnique rbr::id_ for the keyword being built
Returns
An instance of rbr::checked_keyword

Example:

#include <raberu/raberu.hpp>
#include <iostream>
using namespace rbr::literals;
template<typename T>
struct is_big : std::bool_constant<(sizeof(T) > 2)> {};
inline constexpr auto large_value = rbr::keyword<is_big>("large"_id);
int main()
{
std::cout << rbr::settings( large_value = 9.6 );
}
Raberu literals namespace.
Definition: keywords.hpp:369
Defines a group of options for processing.
Definition: settings.hpp:50