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

◆ values()

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

Retrieved the list of all value stored in a settings.

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

Helper Types

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

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

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 vs = rbr::values<std::tuple>(opts);
std::apply([](auto const&... e) { ((std::cout << e << "\n"),...); }, vs);
}
Raberu literals namespace.
Definition: keywords.hpp:369
Defines a group of options for processing.
Definition: settings.hpp:50