How to change DList elements by means of foreach?

Brad Anderson eco at gnuk.net
Wed Aug 21 12:13:03 PDT 2013


On Wednesday, 21 August 2013 at 06:07:21 UTC, monarch_dodra wrote:
> On Wednesday, 21 August 2013 at 03:15:14 UTC, Brad Anderson 
> wrote:
>> Has anything happened since this question was asked that moves 
>> toward fixes this?  I just hit it myself with 
>> std.container.Array.  How is anyone supposed to do anything 
>> productive with std.container containers with this glaring 
>> limitation?  I'm kind of surprised std.container is even 
>> included with phobos with such a deficiency. Does anyone 
>> actually use these containers?
>
> Regarding the foreach and reference problems, AFAIK, no, 
> nothing has been done.
>
> I *have* been fixing more serious problems with DList (the list 
> simply corrupts itself under certain situations). My last pull 
> is currently stuck in "LGTM, but not pulled" limbo.
>
> Once it DList's "Integrity" is fixed, I'll push to update it to 
> use references.

That'd be great.  I'm not sure if you can detect SafeD during 
compilation but perhaps not allowing references when SafeD is 
enabled would be a good compromise.


More information about the Digitalmars-d-learn mailing list