http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-09 18:17:17 UTC --- (In reply to comment #9) > The hackish way of doing this would be to notice during deduction that > substitution of a function type failed, then go back and substitute piece-wise > into return type and argument types until you find the failing type. That > could be done without the changes above, but it'd be a bit gross. It sounds to me like that would be both simpler and better than trying to pass back information about why the substitution failed. If we get to the point where we're trying to explain substitution failure, we can just do the substitution again with tf_warning_or_error and we'll find out exactly what the problem is with the usual error messages.