http://d.puremagic.com/issues/show_bug.cgi?id=10371
Summary: Document no copy construction occurs on struct
initialization/`init` assignment
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: websites
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-06-16
12:39:12 MSD ---
Documentation must guarantee no copy construction occurs on struct
initialization and `init` assignment or usage of any struct with disabled
default construction is not guaranteed to compile:
---
struct S
{ @disable this(this); }
void main()
{
// Copy constructed from temporary?
S s = S();
// Copy constructed from `S.init`?
S s2 = S.init;
// Assigned from `S.init`?
s2 = S.init;
}
---
E.g. in C++ one can use `S s(...)` syntax for this purpose.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------