This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/2112] [3.3/3.4/3.5 Regression] misleading message for binding r-value to non-const reference
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2004 19:56:35 -0000
- Subject: [Bug c++/2112] [3.3/3.4/3.5 Regression] misleading message for binding r-value to non-const reference
- References: <20010226191600.2112.richarda@ixla.com.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-03-19 19:56 -------
I don't consider this as a bug. I'd just close it.
Note that there is not much we can do about it: we can't say that there is an attempt
to bind an rvalue to a non-const reference, because this would imply that we have
already settled on one of the available overloads. However, how can we settle on
one overload if we don't find a suitable one? The only thing we could do in addition to
simply print the available overloads would be to say
candidate 'xyz' is not available because it requires binding a temporary
to a non-const reference
but how should we ever be able to do that? This would amount to second guessing
what the programmer wanted to do, and would likely yield quite a number of cases
where the programmer did not intend this and is more confused by the message
than not.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2112