C++ Logo

std-discussion

Advanced search

Standard Conversions

From: Russell Shaw <rjshaw_at_[hidden]>
Date: Fri, 29 Nov 2024 14:47:17 +1100
Hi, 14882:2024 says:

-------------------------------------------------
7.3.1 General [conv.general]

Certain language constructs require conversion to a value having one of
a specified set of types appropriate to the construct. An expression E
of class type C appearing in such a context is said to be contextually
implicitly converted to a specified type T and is well-formed if and
only if E can be implicitly converted to a type T that is determined as
follows: C is searched for non-explicit conversion functions whose
return type is cv T or reference to cv T such that T is allowed by the
context. There shall be exactly one such T.
-------------------------------------------------

a bit lower it says:

-------------------------------------------------
Note 3 For class types, user-defined conversions are considered as well ...
-------------------------------------------------

Isn't 'Note 3' redundant ? Or does it mean something else ?

Received on 2024-11-29 03:47:26