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

Manfred Nowak svv1999 at hotmail.com
Sat Nov 10 01:12:28 PST 2012


Timon Gehr wrote:

> In theory yes, but
[...]

What a pity. Because in the code given only the types Elem!0 and Elem!1 
must be indeed initialized.

The fact, that the specification of the template describes a family of 
types with an infinite number of members should not force the front end 
to check wether all those members are initializable.

If the executable is not allowed to build new types, which seems to be 
canonically, it is sufficient for the front end to check the 
initializability of those members, for which an initialization is 
imperative.

This polishes my claim in digitalmars.D.learn:40939. For me now it 
appears as a bug, when the front end assumes, that the executable is 
allowed to build new types.

-manfred
  


More information about the Digitalmars-d-learn mailing list