33 template<
typename CRTP_TYPE>
37 void dispatch(T & t) {
38 static_cast<CRTP_TYPE &
>(*this).visit(t);
43 static_cast<CRTP_TYPE &
>(*this).template visit_type<T>();
46 template<std::
size_t index = 0,
typename TUPLE_TYPE>
47 void walk_impl(TUPLE_TYPE & t) {
48 if constexpr(index < std::tuple_size<TUPLE_TYPE>::value) {
49 dispatch(std::get<index>(t));
50 walk_impl<index + 1>(t);
54 template<std::
size_t index = 0,
typename TUPLE_TYPE>
55 void walk_types_impl() {
56 if constexpr(index < std::tuple_size<TUPLE_TYPE>::value) {
59 walk_types_impl<index + 1, TUPLE_TYPE>();
74 template<
typename TUPLE_TYPE>
75 void walk(TUPLE_TYPE & t) {
87 template<
typename TUPLE_TYPE>
89 walk_types_impl<0, TUPLE_TYPE>();
void walk_types()
Definition: tuple_walker.hh:88
std::string type()
Definition: demangle.hh:44
void walk(TUPLE_TYPE &t)
Definition: tuple_walker.hh:75
Definition: tuple_walker.hh:34
Definition: control.hh:31