Jérôme M. Berger wrote:
Walter Bright wrote:
You can specialize the template for strings:

void func(T:string)(T range) { ... }

        Sure, i can also not use a template and write however many
overloaded functions I need. So what are templates for?

The overloaded template specialization capability is exactly because it is often advantageous to write custom versions for certain types. The user of the template doesn't see that, it looks generic to him.

Reply via email to