Documentation of DList in std.container seems to be inaccurate

Meta via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 19 14:56:27 PST 2014


On Wednesday, 19 November 2014 at 15:45:34 UTC, H. S. Teoh via 
Digitalmars-d wrote:
> The documentation was wrong before, but the whole point of 
> removeAny()
> is that it removes *any* element from the container, and it's 
> not
> specified *which* one is removed. The fact that a particular 
> element
> (front or back or whatever) is what happens to be removed from a
> specific container, is something that user code should not rely 
> on. The
> idea is that you just want *one* element from the container, 
> and it
> doesn't matter which, so the container is free to choose the 
> easiest one
> to remove. The fact that the documentation then refers 
> specifically to
> front or back is a bug; user code was not supposed to rely on 
> this.
>
> I'm pretty sure the PR that fixes this problem has been checked 
> in, but
> I'm not sure why dlang.org hasn't been updated yet? Or has it 
> only been
> updated in the phobos-prerelease section?
>
>
> T

Phobos-Prerelease also says that it's removed from the front, so 
the documentation may not have been updated.


More information about the Digitalmars-d mailing list