void main()
{
    T input(T)()
    {}
 
    T input(T : string)()
    {}
}

Error message :

isimsiz.d(6): found 'input' when expecting ';' following statement
isimsiz.d(6): found ':' when expecting ')'
isimsiz.d(6): found 'string' when expecting ';' following statement
isimsiz.d(6): found ')' instead of statement
isimsiz.d(8): unrecognized declaration
 
Shouldn't that work?

And

void main()
{
    void input(T)()
    {}
 
    void input(T : string)()
    {}
}

Again, Shouldn't that work?

Error message:
isimsiz.d(6): Error: declaration input(T : string) is already defined

there is no problem when the templates are in the global namespace.

Reply via email to