On Tuesday, 10 May 2016 at 22:10:06 UTC, ag0aep6g wrote:
Am 10.05.2016 um 21:43 schrieb Lodovico Giaretta:
import std.typecons: RefCounted;
struct S
{
RefCounted!S s; // error: struct S no size yet for
forward reference
}
This used to work with 2.067. I've filed a phobos regression
fo
Am 10.05.2016 um 21:43 schrieb Lodovico Giaretta:
alias Node(T) = RefCounted!(_Node!T);
struct _Node(T)
{
Node!T parent; // error: recursive template expansion
}
I think this is expected. Can't have cycles like that in template
instantiations.
Am 10.05.2016 um 21:43 schrieb Lodovico Giaretta:
import std.typecons: RefCounted;
struct S
{
RefCounted!S s; // error: struct S no size yet for forward reference
}
This used to work with 2.067. I've filed a phobos regression for this
very code, and two related dmd issues with different
Hi,
I'm trying to use std.typecons.RefCounted on recursive structures
to emulate garbage-collected classes, but it doesn't work,
because the RefCounted implementation ends up creating a cycle in
the structure hierarchy.
import std.typecons: RefCounted;
struct S
{
RefCounted!S s; // erro