#include template struct result { }; constexpr struct { template constexpr result operator()(X) const; } f{}; template struct x { }; int main() { auto go = boost::hana::fmap(f, std::make_tuple( <%= 0.upto(x).map { |i| "x<#{i}>{}" }.join(', ') %> ) ); }