Copy elision by spec
    Ali Çehreli 
    acehreli at yahoo.com
       
    Mon Nov  4 09:56:51 PST 2013
    
    
  
On 11/04/2013 03:23 AM, Lars T. Kyllingstad wrote:
 > On Monday, 4 November 2013 at 09:42:53 UTC, Jakob Ovrum wrote:
 >> My understanding is that your example illustrates a *move*, not a
 >> *copy*. AFAICT, non-copyable structs would be next to useless if we
 >> couldn't move them.
 >
 > I know, and I agree.  The question is whether this is a move *by
 > specification*, i.e. whether the language makes a guarantee that return
 > values are always moved under certain circumstances.  If so, this should
 > be mentioned in the spec, along with a detailed description of said
 > circumstances.
I thought so too. So, I prepared the talk "Copy and Move Semantics in D" 
where 'move' is described as a fundamental struct operation. I presented 
the talk at the presence of Walter, Andrei, and other D experts and 
nobody objected! :p (I hope not merely because they were being polite.)
   http://dconf.org/2013/talks/cehreli.html
Ali
    
    
More information about the Digitalmars-d
mailing list