<div dir="ltr"><div dir="ltr">On Sat, Oct 3, 2020 at 11:30 PM Steven Schveighoffer via Digitalmars-d-learn <<a href="mailto:digitalmars-d-learn@puremagic.com">digitalmars-d-learn@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
"StructMemberInitializers with the NonVoidInitializer syntax appear in <br>
the lexical order of the fields in the StructDeclaration" seems to <br>
suggest it will not call the constructor, but instead initialize the <br>
fields according to the list.<br>
<br>
The fields are not a static array, so clearly it is calling the <br>
constructor, and not initializing the fields.<br>
<br>
I really don't think this case is in the spec.<br>
<br>
But I know it works, for instance:<br>
<br>
Variant v = anything;<br>
<br>
If this required an explicit Variant constructor, it would be quite <br>
annoying.<br>
<br>
-Steve<br></blockquote><div><br></div><div>Yes you are right </div></div></div>