Init
This commit is contained in:
34
cppdraft/over/call.md
Normal file
34
cppdraft/over/call.md
Normal file
@@ -0,0 +1,34 @@
|
||||
[over.call]
|
||||
|
||||
# 12 Overloading [[over]](./#over)
|
||||
|
||||
## 12.4 Overloaded operators [[over.oper]](over.oper#over.call)
|
||||
|
||||
### 12.4.4 Function call [over.call]
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/overloading.tex#L3622)
|
||||
|
||||
A [*function call operator function*](#def:operator_function,function_call "12.4.4 Function call [over.call]") is a function named operator() that is a member function with an arbitrary number of parameters[.](#1.sentence-1)
|
||||
|
||||
It may have default arguments[.](#1.sentence-2)
|
||||
|
||||
For an expression of the form
|
||||
|
||||
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1 General [expr.post.general]") ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1 General [expr.post.general]")opt )
|
||||
|
||||
where the [*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1 General [expr.post.general]") is of class type,
|
||||
the operator function
|
||||
is selected by overload resolution ([[over.call.object]](over.call.object "12.2.2.2.3 Call to object of class type"))[.](#1.sentence-3)
|
||||
|
||||
If a surrogate call function is selected,
|
||||
let e be the result of invoking the corresponding conversion operator function on the [*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1 General [expr.post.general]");
|
||||
|
||||
the expression is interpreted as
|
||||
|
||||
e ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1 General [expr.post.general]")opt )
|
||||
|
||||
Otherwise, the expression is interpreted as
|
||||
|
||||
[*postfix-expression*](expr.post.general#nt:postfix-expression "7.6.1.1 General [expr.post.general]") . operator () ( [*expression-list*](expr.post.general#nt:expression-list "7.6.1.1 General [expr.post.general]")opt )
|
||||
Reference in New Issue
Block a user