"Peter Alexander" wrote in message news:[email protected]...

Yes, you're right. I suppose what I mean is that it should be guaranteed that returning a local Lvalue by value should always be moved to the caller destination, rather than copied then destroyed.

S foo() {
   S s;
   return s;
}
S s = foo();  // no destructors or postblits should be called here

The spec needs to guarantee this, otherwise unary std.algorithm.move isn't guaranteed to work for non-copyable types.

Yeah, the spec needs to guarantee no copies. Kenji Hara has done some work on this.

Reply via email to