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

◆ keywords()

template<template< typename... > class List, typename... Opts>
constexpr auto rbr::keywords ( rbr::settings< Opts... > const &  s)
constexpr

Retrieved the list of all keywords in a settings.

Template Parameters
ListA n-ary template type to hold the result values
Parameters
sSettings to inspect
Returns
An instance of rbr::type containing all the keyword from a rbr::settings.

Helper Types

namespace rbr::result
{
template<template<typename...> class List, typename Settings> struct keywords;
template<template<typename...> class List, typename Settings>
using keywords_t = typename keywords<List,Settings>::type;
}
constexpr auto keywords(rbr::settings< Opts... > const &s)
Retrieved the list of all keywords in a settings.
Definition: keys_values.hpp:61
Raberu helper traits namespace.
Definition: drop.hpp:64

Return the type of a call to rbr::keywords.

Example:

#include <raberu/raberu.hpp>
#include <iostream>
#include <tuple>
int main()
{
using namespace rbr::literals;
auto opts = rbr::settings("size"_kw = 75ULL, "modal"_fl, "value"_kw = 13.37);
auto kws = rbr::keywords<std::tuple>(opts);
std::apply( []<typename... T>(T const&...)
{
((std::cout << typename T::id_type{} << "\n"),...);
}
, kws
);
}
Raberu literals namespace.
Definition: keywords.hpp:369
Defines a group of options for processing.
Definition: settings.hpp:50