Problem with const correctness
    Ali Çehreli 
    acehreli at yahoo.com
       
    Fri Dec  7 13:29:08 PST 2012
    
    
  
On 12/07/2012 06:18 AM, Gor Gyolchanyan wrote:
 >   this(this)
 > {
 > _array = _array.dup;
 > }
 >   ref Array!Type_ opAssign(in Array!Type_ array_)
 > {
 > _array = array_._array.dup;
 > return this;
 > }
There has been discussions on the D.learn forum recently. Apparently, 
the compiler-generated opAssign calls the postblit automatically anyway. 
(Maybe also for user-defined opAssign as well. I am not sure.)
Unless there is a compiler bug about that, you may not need the opAssign 
definition after all.
Ali
    
    
More information about the Digitalmars-d
mailing list