On 01/14/2015 07:39 AM, ketmar via Digitalmars-d wrote:
On Wed, 14 Jan 2015 07:09:44 -0800
Ali Çehreli via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

Reduced:

import std.container;

class Node
{
      SList!Node children;
}

void main()
{}

Error: class deneme.Node no size yet for forward reference

I wonder why an SList of a reference type requires the size of the
elements? The following compiles but is that a pointer to a class
variable or a class object? How can we even use the 'children' member?

      SList!(Node*) children;

i don't know: i've never used `std.container` anyway. ;-)


It looks like this came up not too long ago:


http://forum.dlang.org/thread/akkrerlsjutdfmzsw...@forum.dlang.org#post-akkrerlsjutdfmzswsbo:40forum.dlang.org

I think this is a bug but I will wait for others to confirm.

Ali

Reply via email to