Denis Shelomovskii (@denis-sh) reported this on 2013-06-16T01:39:12Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=10371
Description
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.
andrej.mitrovich (@AndrejMitrovic) commented on 2014-04-22T23:43:23Z
*** Issue 9002 has been marked as a duplicate of this issue. ***