Bug 21189 – Plain Old Data and copy constructors

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-08-22T14:26:10Z
Last change time
2020-11-11T02:57:47Z
Keywords
pull
Assigned to
No Owner
Creator
Victor Porton

Comments

Comment #0 by porton — 2020-08-22T14:26:10Z
https://dlang.org/spec/struct.html (about POD) "it has no postblits, destructors, or assignment operators". It is weird that copy constructors are not mentioned in this list. Is it intentional? (Isn't this an erroneous omission in the specification?) In either case, to leave no questions like one I asked in this bug report, it should be explicitly mentioned in the specification.
Comment #1 by razvan.nitu1305 — 2020-11-11T02:41:16Z
Yeah, my bad. The DIPS specifically says that a struct that defines a copy constructor is not POD [1], however that did not make it in the spec. [1] https://github.com/dlang/DIPs/pull/129/files#diff-ecee0474c4314cd47dd8c2656b485c0cfd56e704a85de75839ec2850fb61f0ebR585
Comment #2 by dlang-bot — 2020-11-11T02:43:44Z
@RazvanN7 created dlang/dlang.org pull request #2876 "Fix Issue 21189 - Plain Old Data and copy constructors" fixing this issue: - Fix Issue 21189 - Plain Old Data and copy constructors https://github.com/dlang/dlang.org/pull/2876
Comment #3 by dlang-bot — 2020-11-11T02:57:47Z
dlang/dlang.org pull request #2876 "Fix Issue 21189 - Plain Old Data and copy constructors" was merged into master: - 4655c57580dbe404c2f50584d38fe0d6d0ce3bb5 by Razvan Nitu: Fix Issue 21189 - Plain Old Data and copy constructors https://github.com/dlang/dlang.org/pull/2876