This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53822] spell out typedefs in ambiguous call


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53822

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
Created attachment 31564
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31564&action=edit
patch

(mostly untested)

This changes the message to:
error: call of overloaded 'f(NT&)' {aka 'f(unsigned int&)'} is ambiguous

As far as I can tell, "%#A" is unused, so it seems ok to hijack it.

It isn't very nice because without typedefs it will repeat the same thing
twice, but printing [with NT=unsigned int] seems more complicated to me.

Then maybe the example is not that well chosen, because in the more interesting
cases NT depends on template parameters, and that may make [with ...] easier to
implement (or not).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]