Suggestion: function template overloading

Sean Kelly sean at f4.ca
Tue Aug 29 11:04:53 PDT 2006


Kristian wrote:
> 
> It would be very nice if you could overload function templates as you 
> can in C++. Here is what I mean:
> 
> void f(T)(T val) {...}
> 
> void f(int val) {...}  //error: conflicts with the template function
> 
> It would allow you to write special cases for types that need it.

void f(T)(T val) {}
void f()(int val) {}


Sean



More information about the Digitalmars-d mailing list