Skip to content

Commit

Permalink
Update expressions.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RexJaeschke authored and BillWagner committed Apr 3, 2022
1 parent 82f553c commit 6e2316f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion standard/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ argument_value
;
```
An *argument_list* consists of one or more *argument*s, separated by commas. Each argument consists of an optional *argument_name* followed by an *argument_value*. An *argument* with an *argument_name* is referred to as a ***named argument***, whereas an *argument* without an *argument_name* is a ***positional argument***. It is an error for a positional argument to appear after a named argument in an *argument_list*.
An *argument_list* consists of one or more *argument*s, separated by commas. Each argument consists of an optional *argument_name* followed by an *argument_value*. An *argument* with an *argument_name* is referred to as a ***named argument***, whereas an *argument* without an *argument_name* is a ***positional argument***.
The *argument_value* can take one of the following forms:
Expand Down Expand Up @@ -579,6 +579,8 @@ The corresponding parameters for function member arguments are established as fo
- For properties, when invoking the get accessor there are no arguments. When invoking the set accessor, the expression specified as the right operand of the assignment operator corresponds to the implicit value parameter of the set accessor declaration.
- For user-defined unary operators (including conversions), the single operand corresponds to the single parameter of the operator declaration.
- For user-defined binary operators, the left operand corresponds to the first parameter, and the right operand corresponds to the second parameter of the operator declaration.
- An unnamed argument corresponds to no parameter when it is after an out-of-position named argument or a named params argument.
> *Note*: This prevents `void M(bool a = true, bool b = true, bool c = true, );` being invoked by `M(c: false, valueB);`. The first argument is used out-of-position (the argument is used in first position, but the parameter named `c` is in third position), so the following arguments should be named. In other words, non-trailing named arguments are only allowed when the name and the position result in finding the same corresponding parameter. *end note*
#### 11.6.2.3 Run-time evaluation of argument lists
Expand Down

0 comments on commit 6e2316f

Please sign in to comment.