void myFunc(T: !=int)(T value)
Sean Kelly
sean at invisibleduck.org
Fri Aug 22 14:31:18 PDT 2008
For the record, though, this should work:
struct S
{
int opCmp()( S val ) {}
int opCmp(T)( T val ) {}
}
ie. you make both templates and one just has no parameters. I'm not
sure if the compiler will be able to make this work with the built-in
sort routine, however, so you may want to try:
struct S
{
int opCmp(T)( T val ) {}
alias opCmp!(S) opCmp;
}
Or something like that as well. I'd like to believe that there is some way
to make this work with the compiler as-is.
Sean
More information about the Digitalmars-d-learn
mailing list