Implicit conversion sequence with a null pointer constant
Section [over.best.ics.general]
Lénárd Szolnoki

Created on 2023-01-07.00:00:00 last changed 11 months ago


Date: 2023-01-07.00:00:00

Subclause [over.best.ics.general] paragraph 1, as modified by issue 2525, claims that only the type, cv-qualification, and value category of the argument are relevant in forming an implicit conversion sequence. This is inaccurate for the following situations:

  • A literal 0 can be implicitly converted to a parameter of type void* (and in practice, an implicit conversion sequence does exist), yet the literal 0 has the same type, cv-qualification, and value category as the literal 1 despite no such implicit conversion being allowed for the latter.
  • An initializer list does not have a type, cv-qualification, or value category at all.
  • An overload set does not have a single (function) type.
Date User Action Args
2023-01-07 00:00:00admincreate