The specialization template <> bool validate<const char&> is selected by the compiler when the template template parameter T is deduced from the main template or explicitly specified as const char& . To call validate('a', 'b', 'c') T char is char , and this does not match the expected specialization.
Or specify a specialization for char (i.e. not const char& ):
template <> bool validate<char>(const char& minimum, const char& maximum, const char& testValue) { return validate(toupper(minimum), toupper(maximum), toupper(testValue)); }
or define overload as not a template:
bool validate(char minimum, char maximum, char testValue) { return validate(toupper(minimum), toupper(maximum), toupper(testValue)); }
source share