http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58752
--- Comment #7 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> --- (In reply to Daniel Krügler from comment #6) > (In reply to Richard Smith from comment #4) > Richard, could you please explain what precisely you meant with: > > "Deducing #1 from #2 gives T=const U, which results in a deduction failure > because enable_if<...const U...>::type is not 'void'." > > ? "U" is an arbitrary dependent type here, so "enable_if<...const U...>::type" is dependent, and is not the same type as "void". Partial ordering does not consider the actual types deduced for the use of the template, so we don't know that U = char.