
Hi Luke, I'm not sure your problem is the same as mine. My problem is that the result type gets compiled even though there's absolutely no ambiguity between the 2 functions. There's no need to do any SFINAE discrimination to conclude that foo<T>& matches much better that T& for this call. I'd be happy if the compiler waited to have a true ambiguity to solve before compiling any return type but things are like that, I can't rewrite the norm. Your problem is rather a lack of strength of SFINAE. As you say, the SFINAE principle seems to be only applied on a first-level check. If the substitution fails at a more nested level, it's an error. To be honest, this surprises me. Don't know what the norm says about that... Thanks John to have retried your test, I feel less alone now :-) Bruno