Recursive data structure using template won't compile

Rob T rob at ucora.com
Thu Nov 8 14:07:30 PST 2012


On Thursday, 8 November 2012 at 21:50:02 UTC, Nick Sabalausky 
wrote:
> On Fri, 09 Nov 2012 01:26:44 +0400
> Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:
>> 
>> Just coming up with an idea how it may fail, not arguing for 
>> it being correct ;)
>
> Right. Point is, it's a compiler bug.

For D, as opposed to C/C++, my understanding was that specifying 
forward references to deal with out-of-order difinitions, or 
situations like the one I'm experiencing, was not required, so I 
have to agree it's a "bug" rather than just a limitation of the 
language and compiler. There's no reason why the compiler should 
fail in either case, other than due to a less-than-adequate 
method of evaluating the different structs.

--rt


More information about the Digitalmars-d-learn mailing list