public inbox for
help / color / mirror / Atom feed
From: Gabriel Dos Reis <>
Subject: Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates
Date: Mon, 19 May 2003 21:17:00 -0000	[thread overview]
Message-ID: <> (raw)

The following reply was made to PR c++/10864; it has been noted by GNATS.

From: Gabriel Dos Reis <>
Subject: Re: c++/10864: [diagnostic] Unreadable error message for "no match for 'A < B' operator" if A,B are templates
Date: 19 May 2003 23:08:18 +0200 writes:
 | g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c
 | In member function `bool less<T>::foo() [with T =
 |    X<std::vector<std::string, std::allocator<std::string> >,
 |    std::vector<std::string, std::allocator<std::string> > >]':
 |   instantiated from here
 | error: no match for `X<std::vector<std::string,
 |    std::allocator<std::string> >, std::vector<std::string,
 |    std::allocator<std::string> > > < X<std::vector<std::string,
 |    std::allocator<std::string> >, std::vector<std::string,
 |    std::allocator<std::string> > >' operator
 | Now, that's pretty hard to read. What it says is:
 |   no match for `A < B' operator
 | but the "<" is totally lost in all these template args.
 | I also always thought that the message was somehow
 | truncated, since usually in C++ there must be something
 | after the "operator" :-)
 I fully agree.  I must confess that I have never been sympathetic to
 the way we handle messages saying "no match for bubble[tangle] operator".
 Sometime, they just look very strange to read. 
 | I think it would be nice if the message could be changed
 | to read like
 |   no match for operator< in expression `A < B'
 | That way it would be simpler to figure out which operator
 | exactly is missing.
 I think that is a very good suggestion.
 -- Gaby

             reply	other threads:[~2003-05-19 21:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19 21:17 Gabriel Dos Reis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-20  3:16 Giovanni Bajo
2003-05-20  0:39 bangerth
2003-05-19 15:16 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).