Why is ElementType!(char[]) == dchar?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 9 05:53:53 PDT 2016


On Saturday, 9 July 2016 at 11:57:36 UTC, rikki cattermole wrote:
> That implementation is weird in that it returns a dchar instead 
> of the raw type. Which is decoding, but it is not auto 
> decoding. Auto decoding involves the foreach statement.

You have that backwards. foreach only decodes if you specifically 
ask for it (by specifying wchar or dchar in the statement). 
Phobos does it automatically, whether you like it or not.


More information about the Digitalmars-d-learn mailing list