The Case Against Autodecode
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 2 13:07:11 PDT 2016
On 6/2/2016 12:05 PM, Andrei Alexandrescu wrote:
> * s.all!(c => c == 'รถ') works only with autodecoding. It returns always false
> without.
The o is inferred as a wchar. The lamda then is inferred to return a wchar. The
algorithm can check that the input is char[], and is being tested against a
wchar. Therefore, the algorithm can specialize to do the decoding itself.
No autodecoding necessary, and it does the right thing.
More information about the Digitalmars-d
mailing list