equivariant functions

Denis Koroskin 2korden at gmail.com
Sun Oct 12 14:20:37 PDT 2008


On Mon, 13 Oct 2008 01:16:16 +0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> 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


Yeah, my bad. But still, you can't argue that typeof(str1) == typeof(str2).



More information about the Digitalmars-d mailing list