Using RefCounted in recursive structures and templates

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 10 15:13:18 PDT 2016


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.


More information about the Digitalmars-d-learn mailing list