From Jason Turner

[over.call]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9a9eckct/{from.md → to.md} +17 -12
tmp/tmp9a9eckct/{from.md → to.md} RENAMED
@@ -1,20 +1,25 @@
1
  ### Function call <a id="over.call">[[over.call]]</a>
2
 
3
- `operator()`
4
-
5
- shall be a non-static member function with an arbitrary number of
6
- parameters. It can have default arguments. It implements the function
7
- call syntax
8
 
9
  ``` bnf
10
  postfix-expression '(' expression-listₒₚₜ ')'
11
  ```
12
 
13
- where the *postfix-expression* evaluates to a class object and the
14
- possibly empty *expression-list* matches the parameter list of an
15
- `operator()` member function of the class. Thus, a call `x(arg1,...)` is
16
- interpreted as `x.operator()(arg1, ...)` for a class object `x` of type
17
- `T` if `T::operator()(T1,` `T2,` `T3)` exists and if the operator is
18
- selected as the best match function by the overload resolution
19
- mechanism ([[over.match.best]]).
 
 
 
 
 
 
 
20
 
 
1
  ### Function call <a id="over.call">[[over.call]]</a>
2
 
3
+ A *function call operator function* is a function named `operator()`
4
+ that is a non-static member function with an arbitrary number of
5
+ parameters. It may have default arguments. For an expression of the form
 
 
6
 
7
  ``` bnf
8
  postfix-expression '(' expression-listₒₚₜ ')'
9
  ```
10
 
11
+ where the *postfix-expression* is of class type, the operator function
12
+ is selected by overload resolution [[over.call.object]]. If a surrogate
13
+ call function for a conversion function named `operator`
14
+ *conversion-type-id* is selected, the expression is interpreted as
15
+
16
+ ``` bnf
17
+ postfix-expression '.' operator conversion-type-id '('')' '(' expression-listₒₚₜ ')'
18
+ ```
19
+
20
+ Otherwise, the expression is interpreted as
21
+
22
+ ``` bnf
23
+ postfix-expression '.' operator '('')' '(' expression-listₒₚₜ ')'
24
+ ```
25