foreach of classes

Basile B. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 9 04:43:51 PDT 2016


On Saturday, 9 April 2016 at 11:03:54 UTC, Nicholas Wilson wrote:
> On Saturday, 9 April 2016 at 10:56:34 UTC, Lucien wrote:
>> On Saturday, 9 April 2016 at 10:28:05 UTC, Basile B. wrote:
>>> On Saturday, 9 April 2016 at 10:10:19 UTC, Lucien wrote:
>>>> Hello.
> FYI the things that you can put there (in place of auto) are 
> nothing at all (type is inferred, a type, ref (the foreach 
> variable is taken by reference), const/immutable (the variable 
> is const or immutable).

Yes, it's right that to put the type is a noop, but otherwise DCD 
doesn't work in foreach. Personally I think it s*c*s a lot. The 
manual specification of the type should be allowed.


More information about the Digitalmars-d-learn mailing list