digitalmars.D.bugs - [Issue 12913] New: Mistake concerning DLists
- via Digitalmars-d-bugs (27/27) Jun 13 2014 https://issues.dlang.org/show_bug.cgi?id=12913
https://issues.dlang.org/show_bug.cgi?id=12913 Issue ID: 12913 Summary: Mistake concerning DLists Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: trivial Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: steffen.wolf online.de Hi, I don't know if this is known already - I didn't find a similar bug - but either there's a mistake in the documentation or in the current compiler version (DMD 2.065.0 on Windows 7 x64). The Library documentation for std.container says this concerning DLists: insert is an alias of insertBack, and therefore "Inserts stuff to the back of the container." removeAny "Picks one value from the front of the container, removes it from the container, and returns it." In a recent project, I used insert and removeAny in conjunction to get a queue-like behaviour. Instead, when I tested the code, it behaved like a stack. Therefore, as far as I can tell, either insert has to be an alias of insertFront or removeAny takes elements from the back of the DList. --
Jun 13 2014