------- Comment #3 from pinskia at gcc dot gnu dot org  2007-08-01 00:24 -------
You need to change the operator= to:
        CString& operator=(const CString& newValue){

Otherwise you cannot bind a rvalue to the reference as it will only bind to a
lvalue and returned from operator+ is a rvalue.

In C++0x there are rvalue references which you can use but that feature is not
in a released version of GCC yet.  (it is on the trunk though).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to