Movatterモバイル変換


[0]ホーム

URL:


Issue 2359 - WG21 CWG Issues
Title
Unintended copy initialization with designated initializers
Status
cd5
Section
9.5.2 [dcl.init.aggr]
Submitter
Zhihao Yuan

Created on2017-10-06.00:00:00 last changed62 months ago

Messages

msg6184 (view)
Date: 2018-04-11.00:00:00

Proposed resolution, April, 2018:

Change 9.5.2 [dcl.init.aggr] bullet 4.2 as follows:

Otherwise, the element is copy-initialized from thecorrespondinginitializer-clause oris initialized withthebrace-or-equal-initializer of thecorrespondingdesignated-initializer-clause.
msg6183 (view)
Date: 2018-06-15.00:00:00

[Accepted at the June, 2018 (Rapperswil) meeting.]

According to 9.5.2 [dcl.init.aggr] bullet 4.2,

Otherwise, the element is copy-initialized from thecorrespondinginitializer-clause orthebrace-or-equal-initializer of thecorrespondingdesignated-initializer-clause.

This sounds as if the initialization performed by a designatedinitializer is always copy-initialization. However, it was intendedthat the kind of initialization match the form of the initializer,i.e., adesignated-initializer-clause of the form

  { .x{3} }

was intended to perform direct-initialization.

History
DateUserActionArgs
2020-12-15 00:00:00adminsetstatus: tentatively ready -> cd5
2018-04-11 00:00:00adminsetmessages: +msg6184
2017-10-06 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp