A refinement for pure implementation
    Timon Gehr 
    timon.gehr at gmx.ch
       
    Sat Nov 10 08:26:29 PST 2012
    
    
  
On 11/10/2012 05:21 PM, bearophile wrote:
> Timon Gehr:
>
>> It is strongly pure regardless of potential aliasing in the return
>> value. This is a bug.
>
> This can't be strongly pure:
>
>
> int[] foo2(int[] a) pure {
>      a[0]++;
>      return a;
> }
>
>
> Bye,
> bearophile
The point was that the code you gave should work even without your 
proposed enhancement.
    
    
More information about the Digitalmars-d-learn
mailing list