public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
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: <20030519211600.11856.qmail@sources.redhat.com> (raw)

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

From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: bangerth@dealii.org
Cc: gcc-gnats@gcc.gnu.org
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

 bangerth@dealii.org writes:
 
 | g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
 | y.cc: 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> > >]':
 | y.cc:10:   instantiated from here
 | y.cc:5: 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20030519211600.11856.qmail@sources.redhat.com \
    --to=gdr@integrable-solutions.net \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).