[Bug c++/11138] "no match" error when there is a match ...

bangerth@dealii.org gcc-bugzilla@gcc.gnu.org
Mon Jun 9 20:27:00 GMT 2003


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,



More information about the Gcc-bugs mailing list