------- Comment #7 from jason at gcc dot gnu dot org  2009-03-03 20:46 -------
Issue 291 was resolved, so this shouldn't be suspended anymore.

The testcase is invalid because it is copy-initializing a class which cannot be
copied; returning from test_returnable involves creating a move_only temporary
using the move_only(move_from) constructor, and then copying the temporary into
the return value, which fails because we can't call the copy constructor with
an rvalue argument.  EDG also rejects the testcase in strict mode.

Reduced testcase:

template <class X> struct move_from { };
template <class T> move_from<T> move(T& x);

struct move_only
{
  move_only();
  move_only(move_from<move_only>);

private:
  move_only(move_only& rhs) ;
};

move_only test_returnable()
{
  move_only x;
  return move(x);
}


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
             Status|SUSPENDED                   |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to