Note that the range version is templated on the range type, whereas the array version is templated on the character type. Specifying the array type as a template argument ensures that the range version is called – otherwise it would be ambiguous.