[Bug c++/58752] [C++11] Bogus error: ambiguous class template instantiation
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Mon Nov 11 19:39:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list