From: Rainer Deyke (root_at_[hidden])
Date: 2002-02-04 18:25:24
----- Original Message -----
From: "Howard Hinnant" <hinnant_at_[hidden]>
Sent: Monday, February 04, 2002 2:26 PM
Subject: Re: [boost] auto_vector - vector with auto_ptr semantics
> The concept of move semantics is crucial for high performance,
> safe code.
> What remains to be done is to settle on a uniform syntax for move
> semantics. John Maddock has suggested:
> T b = std::move(a);
What about return-by-move? I see two possibilities:
1. Use the same syntax:
This requires special compiler support to prevent 'a' from being
destroyed before 'b' is constructed.
2. Let the compiler handle it automatically:
Here the compiler realizes that 'a' will be destroyed immediately
after 'b' is constructed, so it uses the movement constructor instead
of the copy constructor if both are available.
-- Rainer Deyke | root_at_[hidden] | http://rainerdeyke.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk