This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1902. What makes a conversion “otherwise ill-formed”?

Section: 12.2.4.2  [over.best.ics]     Status: CD4     Submitter: Richard Smith     Date: 2014-03-26

[Moved to DR at the November, 2014 meeting.]

According to 12.2.4.2 [over.best.ics] paragraph 9,

If no sequence of conversions can be found to convert an argument to a parameter type or the conversion is otherwise ill-formed, an implicit conversion sequence cannot be formed.

However, compare this with 12.2.4.2 [over.best.ics] paragraph 2:

Implicit conversion sequences are concerned only with the type, cv-qualification, and value category of the argument and how these are converted to match the corresponding properties of the parameter. Other properties, such as the lifetime, storage class, alignment, or accessibility of the argument and whether or not the argument is a bit-field are ignored. So, although an implicit conversion sequence can be defined for a given argument-parameter pair, the conversion from the argument to the parameter might still be ill-formed in the final analysis.

It is not clear what cases are in view in paragraph 9.

Proposed resolution (October, 2014):

  1. Change 12.2.4.2 [over.best.ics] paragraph 2 as follows:

  2. Implicit conversion sequences are concerned only with the type, cv-qualification, and value category of the argument and how these are converted to match the corresponding properties of the parameter. Other properties, such as the lifetime, storage class, alignment, or accessibility of the argument, and whether or not the argument is a bit-field, and whether a function is deleted (9.5.3 [dcl.fct.def.delete]), are ignored. So, although an implicit conversion sequence can be defined for a given argument-parameter pair, the conversion from the argument to the parameter might still be ill-formed in the final analysis.
  3. Change 12.2.4.2 [over.best.ics] paragraph 9 as follows:

  4. If no sequence of conversions can be found to convert an argument to a parameter type or the conversion is otherwise ill-formed, an implicit conversion sequence cannot be formed.