Removing from SList (std.container)...

Tobias Pankrath tobias at pankrath.net
Wed Jun 27 02:52:14 PDT 2012


On Wednesday, 27 June 2012 at 09:37:01 UTC, Minas Mina wrote:
> How can I do that?
>
> Why not list.remove(x); like in STL?

std.container encodes the complexity of operations in the method 
names. There is no way to remove a range in constant time in 
SList, so you only get linearRemove.

And you always need a range to remove something.


More information about the Digitalmars-d-learn mailing list