D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21189 - Plain Old Data and copy constructors
Summary: Plain Old Data and copy constructors
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-08-22 14:26 UTC by Victor Porton
Modified: 2020-11-11 02:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Victor Porton 2020-08-22 14:26:10 UTC
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 RazvanN 2020-11-11 02:41:16 UTC
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 Dlang Bot 2020-11-11 02:43:44 UTC
@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 Dlang Bot 2020-11-11 02:57:47 UTC
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