Title
Passing short initializer lists to array reference parameters
Status
cd4
Section
12.2.4.2.6 [over.ics.list]
Submitter
Richard Smith

Created on 2015-01-27.00:00:00 last changed 49 months ago

Messages

Date: 2015-10-15.00:00:00

[Moved to DR at the October, 2015 meeting.]

Date: 2015-05-25.00:00:00

Proposed resolution, May, 2015:

Replace the indicated wording with:

Otherwise, if the parameter type is “array of N X,” if there exists an implicit conversion sequence for each element of the array from the corresponding element of the initializer list (or from {} if there is no such element), the implicit conversion sequence is the worst such implicit conversion sequence.
Date: 2015-01-27.00:00:00

According to 12.2.4.2.6 [over.ics.list] paragraph 5 says,

Otherwise, if the parameter type is “array of N X”, if the initializer list has exactly N elements or if it has fewer than N elements and X is default-constructible, and if all the elements of the initializer list can be implicitly converted to X, the implicit conversion sequence is the worst conversion necessary to convert an element of the list to X.

There are terminological problems with this formulation. “Default constructible” is not otherwise used in the Standard and should instead refer to an implicit conversion sequence from an empty braced-init-list. Similarly, “can be implicitly converted” should instead refer to the existence of an implicit conversion sequence.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: dr -> cd4
2015-11-10 00:00:00adminsetmessages: + msg6076
2015-11-10 00:00:00adminsetstatus: ready -> dr
2015-05-25 00:00:00adminsetmessages: + msg5460
2015-01-27 00:00:00admincreate