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

◆ keyword()

template<typename Type , typename ID >
constexpr typed_keyword< ID, Type > keyword ( ID  id)
related

Create a typed Keyword for reuse.

Template Parameters
TypeType accepted by the keyword
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