https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84920
Bug ID: 84920 Summary: Better handling of unmatched/ambiguous calls Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- As reported by user "jcoffland" on Hacker News: https://news.ycombinator.com/item?id=16598071 > One improvement I'd like to see is a simplified error message > for mismatched overloaded calls. If you make an overloaded call > for which the is no matching conversion or if the conversation is > ambiguous the compiler will "helpfully" dump a list of possibly > matching overloaded function signatures. The list can be hundreds > of lines long. > > For example, when you try to pipe a class to std::cout that > doesn't have an std::ostream &operator<<(std::ostream &, const X &). > Perhaps instead of dumping the complete function signatures it > could show one function signature followed by a list of types > accepted as the second parameter. Since the signatures are > otherwise the same. Such improvements could also reduce > template error spew. I hope to have a look at this in the GCC 9 timeframe, so filing this here.