Brad Roberts wrote:
Andrei Alexandrescu wrote:
You shouldn't do that anyway as structs can be moved freely.

Andrei

Where does the language spec state or suggest that?  A subset of structs
can be (those that contain no internal pointers nor have had their
address taken (including references), but it's not a generally true
fact, as far as I recall.

We plan to do that for D2. It would avoid all issues with C++'s copy
construction and rvalue references.

Structs with internal pointers will be allowed in D2 only if manipulated
exclusively through pointers.


Andrei

Reply via email to