If i @disable the postblit i get a strange behaviour:

[code]
struct Test {
public:
        int _id;

        this(int i) {
                _id = i;

                writeln("CTOR");
        }

        @disable
        this(this);

        ~this() {
                writeln("DTOR");
        }
}

void main() {
        Test[] _arr;

        _arr ~= Test(42);

        writeln(_arr[0]._id);

        writeln("end main");
}
[/code]

prints:

CTOR
DTOR
42
end main

The DTor is called _before_ i write Test's id but i can still print the correct id.
Implicit Copy CTor? ;)

Reply via email to