This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11138] "no match" error when there is a match ...
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2003 20:26:58 -0000
- Subject: [Bug c++/11138] "no match" error when there is a match ...
- References: <20030609201028.11138.zolyfarkas@hotmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11138
bangerth@dealii.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From bangerth@dealii.org 2003-06-09 20:26 -------
Not a bug. a() creates an unnamed temporary which can not be bound
to a reference, unless the reference is const. You need to declare
your operator as
a operator+(const a& a1, const a& a2)
instead.
W,