Deduction of Template Value Parameters

gg noreply at now.pl
Tue Nov 2 18:56:44 PDT 2010


Why we cant deduce value parameter of templates:
void caracterize(uint m)(pp!(m)){
	
}
class pp(uint m){

}
void main(){
	caracterize(pp!5);
}
fails with

dmd chap.d
chap.d(8): Error: template chap.caracterize(uint m) does not match any function template declaration
chap.d(8): Error: template chap.caracterize(uint m) cannot deduce template function from argument types !()(void)

Or at least of a way to extract template instantiation information would be useful. Or  it is needed to do it the long way


More information about the Digitalmars-d mailing list