Created
May 4, 2015 13:12
-
-
Save yannick/1636d9f3c1da2172875e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio; | |
| import std.container.dlist; | |
| void main() | |
| { | |
| auto dl = DList!string(); | |
| dl.insertBack("eins"); | |
| dl.insertBack("zwei"); | |
| dl.insertBack("polizei"); | |
| foreach(s; dl[]) | |
| { | |
| writeln(s); | |
| } | |
| auto dl2 = new DList!string(); | |
| dl2.insertBack("eins"); | |
| dl2.insertBack("zwei"); | |
| dl2.insertBack("polizei"); | |
| foreach(s; dl2[]) // Fails with: Error: need upper and lower bound to slice pointer | |
| { | |
| writeln(s); | |
| } | |
| } |
yannick
commented
May 4, 2015
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment