2.074.0-regression in move semantics

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 22 04:54:12 PDT 2017


AFAICT, release 2.074.0 has regressed move semantics in function 
return statements.

As a consequence, my package

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

no longer compiles.

At master branch, `dub build` now errors as


Performing "debug" build using /usr/bin/dmd for x86_64.
gmp-d 0.0.1+commit.126.g660d82b: building configuration 
"library"...
src/gmp/z.d(484,20): Error: struct gmp.z.MpZ is not copyable 
because it is annotated with @disable
src/gmp/q.d(205,16): Error: template instance 
gmp.z.MpZ.opBinary!"/" error instantiating
src/gmp/z.d(168,16): Error: struct gmp.z.MpZ is not copyable 
because it is annotated with @disable
src/gmp/z.d(921,16): Error: struct gmp.z.MpZ is not copyable 
because it is annotated with @disable
/usr/bin/dmd failed with exit code 1.


which means that the return statement at

https://github.com/nordlow/gmp-d/blob/660d82b99abeef2b26ef3c9c4525d08a2aafdc55/src/gmp/z.d#L484

can no longer move the expression `y`.

I don't understand why this specific case fails when others in 
the standard library apparently hasn't.

Help, please.


More information about the Digitalmars-d mailing list