www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13791] New: std.container implementations don't support

https://issues.dlang.org/show_bug.cgi?id=13791

          Issue ID: 13791
           Summary: std.container implementations don't support forward
                    referenced types
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
import std.container;
struct A { Array!A ary; }
struct B { SList!B slist; }
struct C { DList!C dlist; }
struct D
{
    int id;
    int opCmp(const ref D rhs) const { return id - rhs.id; }
    RedBlackTree!D rbtree;
}
CODE

----

Neither of those containers can handle forward referenced types, but they
should all support it.

--
Nov 28 2014