[Bug c++/99] Bug in template type in error message.

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 1 10:06:05 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org,
                   |                            |egallager at gcc dot gnu.org

--- Comment #24 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #22)
> Perhaps the only solution is to not pretty-print the candidates, which is
> exactly what clang does:
> 
> pr99.cc:8:10: error: call to 'f' is ambiguous
>   return f(X<int>(), X<int>());
>          ^
> pr99.cc:4:26: note: candidate function [with Q = int]
> template<typename Q> int f(X<int>, X<Q>);
>                          ^
> pr99.cc:5:26: note: candidate function [with B = int]
> template<typename B> int f(X<B>, X<myint>);
>                          ^
> 
> Dodji, as the diagnostics maintainer, would that be an acceptable fix?

While Dodji is still technically listed as a diagnostics maintainer, David
Malcolm has been more active as such lately, so I'm cc-ing him, too, to ask
him...


More information about the Gcc-bugs mailing list