Files
2025-10-25 03:02:53 +03:00

49 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[over.match.conv]
# 12 Overloading [[over]](./#over)
## 12.2 Overload resolution [[over.match]](over.match#conv)
### 12.2.2 Candidate functions and argument lists [[over.match.funcs]](over.match.funcs#over.match.conv)
#### 12.2.2.6 Initialization by conversion function [over.match.conv]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/overloading.tex#L1110)
Under the conditions specified in [[dcl.init]](dcl.init "9.5Initializers"), as
part of an initialization of an object of non-class type,
a conversion function can be invoked to convert an initializer
expression of class type to the type of the object
being initialized[.](#1.sentence-1)
Overload resolution is used to select the
conversion function to be invoked[.](#1.sentence-2)
Assuming that “cv T” is the
type of the object being initialized,
the candidate functions are selected as follows:
- [(1.1)](#1.1)
The permissible types for non-explicit conversion functions are
those that can be converted to type T via a standard conversion sequence ([[over.ics.scs]](over.ics.scs "12.2.4.2.2Standard conversion sequences"))[.](#1.sentence-3)
For direct-initialization,
the permissible types for explicit conversion functions are
those that can be converted to type T with a (possibly trivial) qualification conversion ([[conv.qual]](conv.qual "7.3.6Qualification conversions"));
otherwise there are none[.](#1.1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/overloading.tex#L1133)
The argument list has one argument, which is the initializer expression[.](#2.sentence-1)
[*Note [1](#note-1)*:
This argument will be compared against
the object parameter of the conversion functions[.](#2.sentence-2)
— *end note*]