#pragma once #include template void on(T what, std::tuple> match) { auto [a,b] = match; if (what == a) b; } template void on(T what, std::tuple> match, std::tuple> others) { auto [a,b] = match; if (what == a) b; else on(what, others); }