digitalmars.D.learn - Template Instantiation
- Manfred Nowak (19/19) Jun 28 2008 How is the sequence of instantiations determined in case of entwined
How is the sequence of instantiations determined in case of entwined
definitions of templates?
Example:
template Mapping( uint n, Value){
static if( n == 0){
pragma( msg, "map n==0");
alias E!( Value, DATA) Mapping;
} else {
pragma( msg, "map n>0");
alias E!( Mapping!( n -1, Value), MGR) Mapping;
}
}
In which sequence will the instantiation
alias Mapping!(3, int) Map;
auto v= new Map;
cause the template E to be instantiated?
I ask this because on slight modifications I got errors, that E wasn't
instantiated.
-manfred
Jun 28 2008








Manfred Nowak <svv1999 hotmail.com>