Major performance problem with std.array.front()

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Mar 7 17:38:44 PST 2014


On 3/7/14, 4:39 PM, Vladimir Panteleev wrote:
>> s.canFind('é')
>> s.endsWith('é')
>> s.find('é')
>> s.count('é')
>> s.countUntil('é')
>
> These should not compile post-change, because the sought element (dchar)
> is not of the same type as the string. So they will not fail silently.

The compared element need not have the same type (otherwise we'd break 
some other code).

Andrei




More information about the Digitalmars-d mailing list