Add Element to list not Working

Jonathan M Davis jmdavisProg at gmx.com
Mon Apr 2 11:38:51 PDT 2012


On Monday, April 02, 2012 20:27:18 Chris Pons wrote:
> Ah, thank you. I didn't realize taht SList is a struct and that
> it used value semantics. That clears this up.

It really shouldn't be using value semantics (though it wouldn't surprise me 
if it is - I haven't used it). std.container's containers are supposed to be 
reference types, but how that's going to be implemented exactly is still in 
flux - in part due to the pending custom allocator design. In the long run, 
std.container's containers will likely be ref-counted structs in the long run, 
but they may end up being classes.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list