import std.range, std.container; unittest { auto r = iota(0,5); SList!int slist; DList!int dlist; slist.insert(r); // passes dlist.insert(r); // fails } You can insert a range into an SList, but not a DList. usr/include/dlang/dmd/std/container/dlist.d(683): Error: template std.container.dlist.DList!int.DList.createNode cannot deduce function from argument types !()(int), candidates are: /usr/include/dlang/dmd/std/container/dlist.d(166): std.container.dlist.DList!int.DList.createNode(Stuff)(ref Stuff arg, BaseNode* prev = null, BaseNode* next = null) /usr/include/dlang/dmd/std/container/dlist.d(688): Error: template std.container.dlist.DList!int.DList.createNode cannot deduce function from argument types !()(int, BaseNode*), candidates are: /usr/include/dlang/dmd/std/container/dlist.d(166): std.container.dlist.DList!int.DList.createNode(Stuff)(ref Stuff arg, BaseNode* prev = null, BaseNode* next = null) /usr/include/dlang/dmd/std/container/dlist.d(653): Error: template instance std.container.dlist.DList!int.DList.createRange!(Result) error instantiating /usr/include/dlang/dmd/std/container/dlist.d(414): instantiated from here: insertBeforeNode!(Result) phobos_dlist_bug.d(9): instantiated from here: insertBack!(Result) Failed: ["dmd", "-Isrc", "-main", "-unittest", "-debug", "-g", "-v", "-o-", "phobos_dlist_bug.d", "-I."]
This is a regression. Introduced in https://github.com/D-Programming-Language/phobos/pull/2457
Looks like we just need to make DList.createNode an auto ref function?
(In reply to Yuxuan Shui from comment #2) > Looks like we just need to make DList.createNode an auto ref function? Correct, and this was actually fixed by https://github.com/D-Programming-Language/phobos/pull/3787#issuecomment-152760223. I'll go ahead and close.