Skip to content

Instantly share code, notes, and snippets.

@leopoldcambier
leopoldcambier / template.cpp
Last active August 30, 2024 07:26
Chaining functions using C++ templates
#include<tuple>
#include<iostream>
#include<string>
// Returns the Tin of the first element
template<typename... Trs>
struct Tin_list
{
using type = typename std::tuple_element<0, std::tuple<Trs...>>::type::Tin_type;
};