Skip to content

Instantly share code, notes, and snippets.

View marklove5102's full-sized avatar

dsfsdf dumbest marklove5102

View GitHub Profile
@marklove5102
marklove5102 / tupletotype.h
Created March 8, 2025 14:22 — forked from simonrenger/tupletotype.h
C++ Tuple to type generation
#include <tuple>
///////////////////////////////////////////////// TUPLE GENERATOR /////////////////////////////////////////////////
template <unsigned int N, typename T>
struct TupleGenerator {
using type = decltype(std::tuple_cat(std::tuple<T>(), typename TupleGenerator<N - 1, T>::type()));
};
template <typename T>
struct TupleGenerator<0, T> {