Compilable Recursive Data Structure ( was: Recursive data structure using template won't compile)

Manfred Nowak svv1999 at hotmail.com
Fri Nov 9 05:17:27 PST 2012


Rob T wrote:

> The above template definitions define exactly the same structure 
> as the original

No, they implement not _exactly_ the same structure, because they 
supply more freedom than the original templates version. The original 
version forced a recursion onto every implementation, whereas this new 
templates version allows non-recursive implementations.

It might be helpfull to reintroduce the forced recursion using the new 
template definitions.

Hint:
start with
| alias d_list!node00 d_list00;
| d_list00 var;
and publish whether it is possible to compile this line:
| alias R!d_list00 R0; 

-manfred


More information about the Digitalmars-d-learn mailing list