Original Post
I am working with VC++ 2003 and I get an error which makes no sense to me, and the MSDN pages are not helping at all. If someone would be kind enough to suggest a fix... The error is as follows: error C2768: 'bar' : illegal use of explicit template arguments It applies to my attempt at a partial specialization of the second function. While I can specialize foo, which has one template argument, it seems impossible to specialize bar over one of its template arguments.
template <size_t A>
void foo()
{
}
template <>
void foo<0>()
{
}
template <size_t A, size_t B>
void bar()
{
}
template <size_t A>
void bar<A, 0>()
{
}