Bug 10371 – Document no copy construction occurs on struct initialization/`init` assignment

Status
NEW
Severity
normal
Priority
P3
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-16T01:39:12Z
Last change time
2024-12-15T15:22:15Z
Keywords
spec
Assigned to
No Owner
Creator
Denis Shelomovskii
Blocks
10372
Moved to GitHub: dlang.org#4026 →

Comments

Comment #0 by verylonglogin.reg — 2013-06-16T01:39:12Z
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.
Comment #1 by andrej.mitrovich — 2014-04-22T23:43:23Z
*** Issue 9002 has been marked as a duplicate of this issue. ***
Comment #2 by robert.schadek — 2024-12-15T15:22:15Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dlang.org/issues/4026 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB