May 23, 2019
https://issues.dlang.org/show_bug.cgi?id=19894

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
Once a postblit is defined (even if it is marked @disable) all copy constructors are ignored (in the sense that the compiler will not insert calls to them; the copy constructors can still be called explicitly).

In this specific situation, disabling the postblit in a member field will make the struct uncopyable, which is the correct behavior. If you want to make A uncopyable but still, have Move(T) copyable, simply use only copy constructors:

struct Move(T) {
private:
        import std.algorithm : move;
        T storage;
public:
        this(ref return scope Move rhs) {}
}

struct A {
        @disable this(ref A);
}

void main() {
        Move!A x;
        Move!A y = x;
}

--