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

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

Messages

Date: 2023-01-07.00:00:00

Subclause 12.2.4.2.1 [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.
History
Date User Action Args
2023-01-07 00:00:00admincreate