10template<
typename Type>
13 return std::ref(
const_cast<Type&
>(value));
19 using weight_t = double;
20 using name_t =
const char*;
23 using personal_info_t =
29 info.emplace_back(10);
30 info.emplace_back(20);
31 info.emplace_back(40.6);
32 info.emplace_back(50.7);
33 info.emplace_back(
"Thomas Kim");
34 info.emplace_back(
"Steve Park");
36 stream <<
"The contents of info: " << info <<
endl;
49 std::vector<std::reference_wrapper<age_t>> ages;
50 std::vector<std::reference_wrapper<weight_t>> weights;
51 std::vector<std::reference_wrapper<name_t>> names;
60 types::overloads filters
62 [&ages](
const age_t& age)
63 { ages.emplace_back(
to_ref(age)); },
64 [&weights](
const weight_t& weight)
65 { weights.emplace_back(
to_ref(weight)); },
66 [&names](
const auto& name)
67 { names.emplace_back(
to_ref(name)); }
70 filters.for_each(info);
reference_wrapper< Type > ref(Type &val) noexcept
auto to_ref(const Type &value)
void how_to_filter_containers_for_variants()
Type to string name conversions are defined.
hidden::container_of_variants_t< ContainerType, ElementTypes... > container_of_variants_t
Stream output operators << are implemented.