This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32944] operator= not ambiguous overload but does not compile
- From: "pcarlini at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2007 12:37:37 -0000
- Subject: [Bug c++/32944] operator= not ambiguous overload but does not compile
- References: <bug-32944-14925@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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