On 12/19/17 6:27 AM, ketmar wrote:

note that D devs stubbornly insists that `auto` is not a type placeholder, but a storage qualifier, like `static`, so you can't write `foreach (auto c; ...)` (and compiler rejects such code). yet, `if (auto c = ...)` is perfectly allowed, and here `auto` is type placeholder. talking about consistency, yeah.

I insist that auto is a storage qualifier, AND I think it should be allowed as the storage qualifier for the foreach variable.

foreach(ref c; ...) works. I don't see why foreach(auto c; ...) shouldn't.

-Steve

Reply via email to