[Bug c++/32944] operator= not ambiguous overload but does not compile

pcarlini at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Jul 31 12:37:00 GMT 2007



------- Comment #1 from pcarlini at suse dot de  2007-07-31 12:37 -------
The compiler is right: operator+ returns a *temporary* CString and you have an
assignment operator taking a *non const* reference. Just change the latter to
take a const reference.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
            Summary|operator= not ambiguous     |operator= not ambiguous
                   |overload but does not       |overload but does not
                   |compile                     |compile


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32944



More information about the Gcc-bugs mailing list