equivariant functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 12 14:52:25 PDT 2008


Denis Koroskin wrote:
> Sorry to hit a dead horse but...
> 
> auto dg = &stripl; // what is the type of dg?

stripl is three overloads. You must use a precise type on the receiving 
side to get a pointer to function, as with any overloaded symbol.

> string z = dg("foo");
> char[] x = dg("foo".dup);
> 
> It is great that you brought the issue to discussion, but I think this 
> solution is a miss.

I'm glad you're trying to dent it, this is the best way to find bugs in 
it. But let me note that so far you haven't gotten even near :o).


Andrei



More information about the Digitalmars-d mailing list