Hi,

I try to make a class template with single template argument defaulted to some type. Is it possible to use the name of class without specification of template argumet (no '!' operator)?

Example:

class ClassName(T=double) {
    this(T value) { /// do some stuff here
    }
    /// some other stuff..
}


void main() {
a = ClassName(1.2); /// error: cannot deduce function from argument types !()(int)
    a = ClassName!double(1.2); /// OK
}

It seems the compiler treats 'ClassName' as function, but it is obvious that it should treat it as 'ClassName!double'.


Reply via email to