You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jensmaurer
changed the title
The comment of the example in [dcl.init.general] p16.6.1 is wrong
The comment of the example in [dcl.init.general] p16.6.1 is wrong CWG2612
Mar 2, 2023
[dcl.init.general] p16.6.1
The result object
x
is not definitely initialized by the default constructor. The result object is actually value-initialized.In this case, the result object will be zero-initialized if
T
has a trivial default constructor. This point can be shown by this example.The result printed by Clang is
If the default constructor were called for
#1
, the subobjectA::a
would be uninitialized.The comment should just say
x
is value-initialized.The text was updated successfully, but these errors were encountered: