Created on 2023-05-11.00:00:00 last changed 19 months ago
Suggested resolution:
Change in 12.2.4.2.6 [over.ics.list] bullet 7.2 as follows:
- ...
- Otherwise, the implicit conversion sequence is a user-defined conversion sequence whose user-defined conversion is specified by the constructor C and whose first and second standard conversion
sequence is ansequences are identityconversionconversions.
Consider:
struct C { C(int); }; struct A { A(C); }; struct B { B(C); }; int f(const A&); int f(B&&); int x = f({1});
Subclause 12.2.4.2.3 [over.ics.user] paragraph 1 specifies:
A user-defined conversion sequence consists of an initial standard conversion sequence followed by a user-defined conversion (11.4.8 [class.conv]) followed by a second standard conversion sequence. If the user-defined conversion is specified by a constructor (11.4.8.2 [class.conv.ctor]), the initial standard conversion sequence converts the source type to the type of the first parameter of that constructor. ...
However, there is no "source type" for an initializer list, making the treatment of the example unclear.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-05-13 20:42:09 | admin | set | messages: + msg7287 |
2023-05-11 00:00:00 | admin | create |