In the C++14 draft standard, [temp.param]/11 says:
If a template-parameter of a primary class template or alias template is a template parameter pack, it shall be the last template-parameter.
If you try compiling the following template, then the compiler will complain.
template< typename ...Args, void(*f)(Args...) > // ERROR
struct Bar
{};
But how does it work in this case?
template< typename F, F >
struct Bar;
template< typename ...Args, void(*f)(Args...) > // OK ???
struct Bar< void(*)(Args...), f >
{};
I can see that it has something to do with it being part of the specialization class template, but why?
The rule clearly states that it applies to a primary class template. Does this mean that the rules change for specializations?
I tried to search for this in the standard, but couldn't find anything. Can you please shine some light into this.