Link to reflector thread (if any): Message c++std-core-18566 , Issue number ########2).
Issue description: (Note: an issue report was mailed 13 years ago (-> reflector message), but unfortunately wasn't converted into an official core issue. Trying this again today!).
Says
Otherwise, if the parameter has an aggregate type which can be initialized from the initializer list according to the rules for aggregate initialization ([dcl.init.aggr]), the implicit conversion sequence is a user-defined conversion sequence whose second standard conversion sequence is an identity conversion.
But a user-defined conversion sequence is defined as a SCS, followed by a UDC, followed by another SCS. A UDC is either a call to a conversion function or a call to a constructor. Neither one of them happens for aggregate initialization! https://eel.is/c++draft/over.ics.user#1.sentence-1
A user-defined conversion sequence consists of an initial standard conversion sequence followed by a user-defined conversion ([class.conv]) followed by a second standard conversion sequence.
The aggregate initialization is a constituent of a user defined conversion sequence, because it's used when ranking UCSes against each other.
Suggested resolution:
Therefore the definition of "user defined conversion sequence" should mention that instead of a user-defined conversion in the middle between the two SCSes, an aggregate initialization can appear instead of a UDC. Or at the very least, make the UDC inside of a UDCS optional.
Full name of submitter (unless configured in github; will be published with the issue): Johannes Schaub
Reference (section label): https://eel.is/c++draft/over.ics.list#8.sentence-1
Link to reflector thread (if any): Message c++std-core-18566 , Issue number
########2
).Issue description: (Note: an issue report was mailed 13 years ago (-> reflector message), but unfortunately wasn't converted into an official core issue. Trying this again today!).
Says
But a user-defined conversion sequence is defined as a SCS, followed by a UDC, followed by another SCS. A UDC is either a call to a conversion function or a call to a constructor. Neither one of them happens for aggregate initialization! https://eel.is/c++draft/over.ics.user#1.sentence-1
The aggregate initialization is a constituent of a user defined conversion sequence, because it's used when ranking UCSes against each other.
Suggested resolution: Therefore the definition of "user defined conversion sequence" should mention that instead of a user-defined conversion in the middle between the two SCSes, an aggregate initialization can appear instead of a UDC. Or at the very least, make the UDC inside of a UDCS optional.