equivariant functions

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


Denis Koroskin wrote:
> On Sun, 12 Oct 2008 23:34:05 +0400, Andrei Alexandrescu 
> <SeeWebsiteForEmail at erdani.org> wrote:
> Let's turn it into 'equivariant function':
> const(char)* strstr(const(char)* str1, const(char)* str2);
> 
> Do you see the problem already?

Yes, you didn't write it properly :o). The correct syntax is:

typeof(str1) strstr(const(char)* str1, const(char)* str2);


Andrei



More information about the Digitalmars-d mailing list