Check out
BOOST_PP_REPEAT
and similar macros in boost.preprocessor. They achieve this by pregenerating N boilerplate macros, allowing you to loop up to N iterations. This is impossible to achieve without boilerplate, unless you're willing to list each template argument in the macro call. E.g. something like REPEAT( (1)(2)(3), template <> void myFunc<N_>(std::array<float, N_> data); )
should be doable (probably with a slightly more complex syntax, but the same idea).