Guys, I'm doing excercises from "The C++ Programming Language 3rd ed." and on page 340 there is an example of function:
template <class T, class C = Cmp<T> > // Here is a default argument
// But as far as I'm concerned it's illegal to have a default argument in
// a function template
int compare (const String<T>& str1, const String<T>& str2)
{
/*Some code*/
}
So my question is:
Is there a mistake in a book or I'm getting this wrong?