www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD Git master regression: disabled postblits during CTFE

The file https://github.com/nordlow/gmp-d/blob/master/src/gmp/z.d

in my

https://github.com/nordlow/gmp-d

package errors during compilation with DMD Git master as

z.d(2350,16): Error: struct gmp.z.MpZ is not copyable because it 
is annotated with  disable

Specifically, this happens in the return statement in the 
compile-time call of eval() during in the `static assert` here:


/// `MpZ`-`MpZ` adding expression.
struct MpzAddExpr(T1, T2)
     if (isMpZExpr!T1 &&
         isMpZExpr!T2)
{
     T1 e1;                      // first term
     T2 e2;                      // second term
     pragma(inline, true)
     MpZ eval() const  trusted
     {
         typeof(return) y = null;
         __gmpz_add(y._ptr, e1.eval()._ptr, e2.eval()._ptr); 
version(ccc) ++y._ccc;
         return y;
     }
}
version(unittest) static assert(isMpZExpr!(MpzAddExpr!(MpZ, 
MpZ)));


It seems like CTFE no longer allows the `Mpz`-instance to be 
moved in the `return` statement of `eval()`.

This doesn't happen with 2.073.1.
Mar 24 2017