> "Walter Bright" <newshou...@digitalmars.com> wrote in message >> Yes. Constraints determine the list of candidate template declarations, >> but do not participate in the partial ordering of candidates to determine >> the 'best' match.
Nick Sabalausky wrote: > Pardon my ignorance, but...umm...what? Example: class C {} void foo(T)() if(is(T : Object)) {} void foo(T)() if(is(T : C)) {} void bar(T : Object)() {} void bar(T : C)() {} void main() { foo!(C)(); // error: ambiguous, (both are candidate, no ordering) bar!(C)(); // ok, (both are candidate, second bar more specialized) }