Create empty SList or DList.

bauss jj_1337 at live.dk
Wed Jun 26 17:39:19 UTC 2019


Is there a way to achieve that instead of something hacky like 
adding an initialized element and then removing it.

Ex. instead of:

auto stack = SList!int(0);
stack.removeFront();

Then something that just allowed you to do:
auto stack = SList!int; // Not allowed.

---

I feel like this makes containers like that a big hassle in D 
because you may not wanna initialize the elements of them right 
away.


More information about the Digitalmars-d-learn mailing list