questions: remove from SList

kennytm kennytm at gmail.com
Tue Oct 11 10:29:02 PDT 2011


"Steven Schveighoffer" <schveiguy at yahoo.com> wrote:

> Yes, I'd agree either remove's implementation or its constraint 
> specification are buggy.  It should not specify that it needs a forward 
> range and then use bi-directional range primitives.
> 

I think remove's constraint is fine. With a SList you don't really want to
remove the current node, but the 'next' node. SList should provide the O(1)
removeNext and insertNext functions (c.f. C++11's std::forward_list).


More information about the Digitalmars-d mailing list