DList -- removing an element

d coder dlang.coder at gmail.com
Sun Dec 30 02:48:18 PST 2012


Ok, I thought I found the answer in an earlier thread
http://forum.dlang.org/thread/lozpofrboxsfybmhkhch@forum.dlang.org

auto range = find(list[], elem);
list.remove(take(range, 1));

But it does not work. Gives me:

Error: function std.container.DList!(Foo).DList.remove (Range r) is not
callable using argument types (Take!(Range))
Error: cannot implicitly convert expression (take(range, 1LU)) of type
Take!(Range) to Range

I get similar issues if I try using std.algorithm.filter instead of find.

I am using latest DMD snapshot from github.

Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121230/68639fbd/attachment-0001.html>


More information about the Digitalmars-d mailing list