33 stream <<
"I am a cow. My name is " <<
m_name <<
", I weigh "
38template<
typename... Animals>
41 using Animals::operator()...;
47 template<
size_t type_index>
55 base_type::operator()();
58 template<
size_t StartIndex,
size_t EndIndex>
63 if constexpr(StartIndex < EndIndex)
68 auto& base =
static_cast<const base_type&
>(af);
73 if constexpr(StartIndex + 1 < EndIndex)
88template<
typename... Animals>
95 Cat cat{
"Thomas the Cat"};
97 AnimalFarm myfarm { cat,
Dog{
"Dog the Friendly"},
Cow{
"Pretty Cow", 500.0} };
AnimalFarm(Animals...) -> AnimalFarm< Animals... >
hidden::select_nth_type_t< SelectIndex, Types... > select_nth_type_t
constexpr auto type_count_v
static void report(const AnimalFarm &af)
AnimalFarm(Animals... animals)
This type is used to manipulate type list.
Stream output operators << are implemented.