Deduction of Template Value Parameters
    bearophile 
    bearophileHUGS at lycos.com
       
    Tue Nov  2 19:41:20 PDT 2010
    
    
  
gg:
> Why we cant deduce value parameter of templates:
> void caracterize(uint m)(pp!(m)){
> 	
> }
> class pp(uint m){
> 
> }
> void main(){
> 	caracterize(pp!5);
> }
You are doing it wrong. Try:
caracterize(new pp!5U());
You need to build the class instance with new, and if you want an uint you need to add a U.
You may also ask similar questions in the D.learn group.
Bye,
bearophile
    
    
More information about the Digitalmars-d
mailing list