---
title: "Grammar non-terminals for\npostfix-expressions"
document: P4176R0
date: 2026-04-20
audience: Core Working Group
reply-to:
  - "Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>"
paper-type: proposal
---

# Abstract

7.6.1 [[expr.post]](https://wg21.link/expr.post) lists all the grammar at the top, while the rest of the subclause resorts to either quoting the grammar or describing it with words. This paper aims to improve the situation, introducing new nonterminals and putting their definitions in the respective subclauses.

# Revision history

R0:

- Initial revision.

# Approach

- Move grammar definitions of various forms of postfix-expression from 7.6.1.1 [[expr.post.general]](https://wg21.link/expr.post.general) to their respective subclauses, defining new non-terminals.
- Define postfix-expressions in terms of new non-terminals.
- Make adjustments to the surrounding wording to improve integration between grammar and description of the semantics.
- Replace usages of regular font terms with their corresponding grammar productions, when grammatical parts are referred to. For instance, usages of “function call” that refer to its postfix-expression are replaced with function-call-expression.

No changes to behavior of programs are intended.

Hide removals:

Strikethrough:

# Proposed wording

## Postfix expressions [[expr.post]](https://wg21.link/expr.post)

### General [[expr.post.general]](https://wg21.link/expr.post.general)

Change 7.6.1.1 [[expr.post.general]](https://wg21.link/expr.post.general) paragraph 1 as follows:

> 1 Postfix expressions group left-to-right.
> 
> > postfix-expression
> > 
> > :
> > 
> > > primary-expression
> > > 
> > > postfix-expression
> > > 
> > > [
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > ]
> > > 
> > > subscript-expression
> > > 
> > > postfix-expression
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> > > 
> > > function-call-expression
> > > 
> > > simple-type-specifier
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> > > 
> > > typename-specifier
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> > > 
> > > simple-type-specifier
> > > 
> > > braced-init-list
> > > 
> > > typename-specifier
> > > 
> > > braced-init-list
> > > 
> > > type-conversion-expression
> > > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > template
> > > 
> > > <sub>opt</sub>
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > splice-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > template
> > > 
> > > <sub>opt</sub>
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > splice-expression
> > > 
> > > class-member-access-expression
> > > 
> > > postfix-expression
> > > 
> > > ++
> > > 
> > > post-increment-expression
> > > 
> > > postfix-expression
> > > 
> > > --
> > > 
> > > post-decrement-expression
> > > 
> > > dynamic_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > dynamic-cast-expression
> > > 
> > > static_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > static-cast-expression
> > > 
> > > reinterpret_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > reinterpret-cast-expression
> > > 
> > > const_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > const-cast-expression
> > > 
> > > typeid
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > typeid
> > > 
> > > (
> > > 
> > > type-id
> > > 
> > > )
> > > 
> > > typeid-expression
> 
> > expression-list
> > 
> > :
> > 
> > > initializer-list

Remove 7.6.1.1 [[expr.post.general]](https://wg21.link/expr.post.general) paragraph 2:

> 2
> 
> > [*Note:* The `>` token following the type-id in a `dynamic_cast`, `static_cast`, `reinterpret_cast`, or `const_cast` can be the product of replacing a `>>` token by two consecutive `>` tokens (13.3 [[temp.names]](https://wg21.link/temp.names)). — *end note* ]

[ Drafting note: A similar note is added to each kind of cast. ]

### Subscripting [[expr.sub]](https://wg21.link/expr.sub)

Change 7.6.1.2 [[expr.sub]](https://wg21.link/expr.sub) paragraph 1 as follows:

> 1 A *subscript expression* is a <del>postfix expression followed by square brackets containing a possibly empty, comma-separated list of initializer-clauses that</del> <ins>subscript-expression, which has the following form</ins>
> 
> > subscript-expression
> > 
> > :
> > 
> > > postfix-expression
> > > 
> > > [
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > ]
> 
> <ins>The expression-list</ins> constitute<ins>s</ins> the arguments to the subscript operator. The postfix-expression and the initialization of the object parameter (9.3.4.6 [[dcl.fct]](https://wg21.link/dcl.fct)) of any applicable subscript operator function (12.4.5 [[over.sub]](https://wg21.link/over.sub)) is sequenced before each expression in the expression-list and also before any default argument (9.3.4.7 [[dcl.fct.default]](https://wg21.link/dcl.fct.default)). The initialization of a non-object parameter of a subscript operator function `S`, including every associated value computation and side effect, is indeterminately sequenced with respect to that of any other non-object parameter of `S`.

### Function call [[expr.call]](https://wg21.link/expr.call)

Change 7.6.1.3 [[expr.call]](https://wg21.link/expr.call) paragraph 1 as follows:

> 1 A <del>function call</del> <ins>*function call*</ins> is a <del>postfix expression followed by parentheses containing a possibly empty, comma-separated list of initializer-clauses which</del> <ins>function-call-expression, which has the form</ins>
> 
> > function-call-expression
> > 
> > :
> > 
> > > postfix-expression
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> 
> <ins>The expression-list, if present,</ins> constitute<ins>s</ins> the arguments to the function.
> 
> > [*Note:* If the <del>postfix expression</del> <ins>postfix-expression</ins> is a function name, the appropriate function and the validity of the call are determined according to the rules in 12.2 [[over.match]](https://wg21.link/over.match). — *end note* ]
> 
> The <del>postfix expression</del> <ins>postfix-expression *E*</ins> shall have function type or function pointer type. For a call to a non-member function or to a static member function, <del>the postfix expression</del> <ins>*E*</ins> shall be either an lvalue that refers to a function (in which case the function-to-pointer standard conversion (7.3.4 [[conv.func]](https://wg21.link/conv.func)) is suppressed on <del>the postfix expression</del> <ins>*E*</ins>), or a prvalue of function pointer type.

Change 7.6.1.3 [[expr.call]](https://wg21.link/expr.call) paragraph 2 as follows:

> 2 If the selected function is non-virtual, or if the id-expression in the <del>class member access expression</del> <ins>class-member-access-expression</ins> is a qualified-id, that function is called. Otherwise, its final overrider (11.7.3 [[class.virtual]](https://wg21.link/class.virtual)) in the dynamic type of the object expression is called; such a call is referred to as a *virtual function call*.
> 
> > [*Note:* [. . .] — *end note* ]

### Explicit type conversion
(functional notation) [[expr.type.conv]](https://wg21.link/expr.type.conv)

Change 7.6.1.4 [[expr.type.conv]](https://wg21.link/expr.type.conv) paragraph 1 as follows:

> > type-conversion-expression
> > 
> > :
> > 
> > > simple-type-specifier
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> > > 
> > > typename-specifier
> > > 
> > > (
> > > 
> > > expression-list<sub>opt</sub>
> > > 
> > > )
> > > 
> > > simple-type-specifier
> > > 
> > > braced-init-list
> > > 
> > > typename-specifier
> > > 
> > > braced-init-list
> 
> 1 <del>A simple-type-specifier or typename-specifier followed by a parenthesized optional expression-list or by a braced-init-list (the initializer)</del> <ins>A type-conversion-expression</ins> constructs a value of the <del>specified</del> type <ins>specified by simple-type-specifier or typename-specifier</ins> given the initializer<ins>, which is braced-init-list or parentheses containing optional expression-list</ins>. If the type is a placeholder for a deduced class type, it is replaced by the return type of the function selected by overload resolution for class template deduction for the remainder of this subclause. Otherwise, if the type contains a placeholder type, it is replaced by the type determined by placeholder type deduction (9.2.9.7.2 [[dcl.type.auto.deduct]](https://wg21.link/dcl.type.auto.deduct)). Let `T` denote the resulting type. Then:
> 
> - (1.1) If the initializer is a parenthesized <del>single expression</del> <ins>expression-list with a single initializer-clause</ins>, the type conversion expression is equivalent to the corresponding cast expression (7.6.3 [[expr.cast]](https://wg21.link/expr.cast)).
> - (1.2) Otherwise, if `T` is *cv* `void`, the initializer shall be `()` or `{}` (after pack expansion, if any), and the expression is a prvalue of type `void` that performs no initialization.
> - (1.3) Otherwise, if `T` is a reference type, the expression has the same effect as direct-initializing an invented variable `t` of type `T` from the initializer and then using `t` as the result of the expression; the result is an lvalue if `T` is an lvalue reference type or an rvalue reference to function type and an xvalue otherwise.
> - (1.4) Otherwise, the expression is a prvalue of type `T` whose result object is direct-initialized (9.5 [[dcl.init]](https://wg21.link/dcl.init)) with the initializer.
> 
> If the initializer is a parenthesized optional expression-list, `T` shall not be an array type.
> 
> > [*Example:* [. . .] — *end example* ]

### Class member access [[expr.ref]](https://wg21.link/expr.ref)

Change 7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref) paragraph 1 as follows:

> 1 A *class member access expression* is a class-member-access-expression, which has one of the following forms
> 
> > class-member-access-expression
> > 
> > :
> > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > template
> > > 
> > > <sub>opt</sub>
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > splice-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > template
> > > 
> > > <sub>opt</sub>
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > splice-expression
> 
> <del>A postfix expression followed by a dot `.` or an arrow `->`, optionally followed by the keyword `template`, and then followed by an id-expression or a splice-expression, is a postfix expression.</del>
> 
> > [*Note:* If the keyword `template` is used and followed by an id-expression, the unqualified name is considered to refer to a template (13.3 [[temp.names]](https://wg21.link/temp.names)). If a simple-template-id results and is followed by a `::`, the id-expression is a qualified-id. — *end note* ]

Change footnote 45 referenced from 7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref) paragraph 3:

> If the <del>class member access expression</del> <ins>class-member-access-expression</ins> is evaluated, the subexpression evaluation happens even if the result is unnecessary to determine the value of the entire postfix expression, for example if the id-expression denotes a static member.

### Increment and decrement [[expr.post.incr]](https://wg21.link/expr.post.incr)

Apply the following changes to the entire subclause 7.6.1.6 [[expr.post.incr]](https://wg21.link/expr.post.incr):

> > post-increment-expression
> > 
> > > postfix-expression
> > > 
> > > ++
> 
> > post-decrement-expression
> > 
> > > postfix-expression
> > > 
> > > --
> 
> 1 The value of <del>a postfix `++` expression</del> <ins>a post-increment-expression</ins> is the value obtained by applying the lvalue-to-rvalue conversion (7.3.2 [[conv.lval]](https://wg21.link/conv.lval)) to its operand<ins>, which is the postfix-expression</ins>.
> 
> > [*Note:* The value obtained is a copy of the original value. — *end note* ]
> 
> The operand shall be a modifiable lvalue. The type of the operand shall be an arithmetic type other than *cv* `bool`, or a pointer to a complete object type. An operand with volatile-qualified type is deprecated; see D.4 [[depr.volatile.type]](https://wg21.link/depr.volatile.type). The value of the operand object is modified (3.1 [[defns.access]](https://wg21.link/defns.access)) as if it were the operand of the prefix `++` operator (7.6.2.3 [[expr.pre.incr]](https://wg21.link/expr.pre.incr)). The value computation of the `++` expression is sequenced before the modification of the operand object. With respect to an indeterminately-sequenced function call, the operation of postfix `++` is a single evaluation.
> 
> > [*Note:* Therefore, a function call cannot intervene between the lvalue-to-rvalue conversion and the side effect associated with any single postfix `++` operator. — *end note* ]
> 
> The result is a prvalue. The type of the result is the cv-unqualified version of the type of the operand.
> 
> 2 The operand of <del>postfix `--`</del> <ins>post-decrement-expression</ins> is decremented analogously to the <del>postfix `++` operator</del> <ins>post-increment-expression</ins>.
> 
> > [*Note:* For prefix increment and decrement, see 7.6.2.3 [[expr.pre.incr]](https://wg21.link/expr.pre.incr). — *end note* ]

### Dynamic cast [[expr.dynamic.cast]](https://wg21.link/expr.dynamic.cast)

Change 7.6.1.7 [[expr.dynamic.cast]](https://wg21.link/expr.dynamic.cast) paragraph 1 as follows:

> > dynamic-cast-expression
> > 
> > :
> > 
> > > dynamic_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> 
> 1 <del>The result of the expression `dynamic_cast<T>(v)` is the result of converting the expression `v` to type `T`.</del> <ins>The result of a dynamic-cast-expression is the result of converting the expression `v` to the type `T` designated by the type-id.</ins> `T` shall be a pointer or reference to a complete class type, or “pointer to *cv* `void`”. The `dynamic_cast` operator shall not cast away constness (7.6.1.11 [[expr.const.cast]](https://wg21.link/expr.const.cast)).
> 
> > [*Note:* The `>` token following the type-id can be the product of replacing a `>>` token by two consecutive `>` tokens (13.3 [[temp.names]](https://wg21.link/temp.names)). — *end note* ]

### Type identification [[expr.typeid]](https://wg21.link/expr.typeid)

Change 7.6.1.8 [[expr.typeid]](https://wg21.link/expr.typeid) paragraph 1 as follows:

> > typeid-expression
> > 
> > > typeid
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> > > 
> > > typeid
> > > 
> > > (
> > > 
> > > type-id
> > > 
> > > )
> 
> 1 The result of a <del>`typeid` expression</del> <ins>typeid-expression</ins> is an lvalue of static type `const std::type_info` (17.7.3 [[type.info]](https://wg21.link/type.info)) and dynamic type `const std::type_info` or `const` *name* where *name* is an implementation-defined class publicly derived from `std::type_info` which preserves the behavior described in 17.7.3 [[type.info]](https://wg21.link/type.info).<sup>48</sup> The lifetime of the object referred to by the lvalue extends to the end of the program. Whether or not the destructor is called for the `std::type_info` object at the end of the program is unspecified.

### Static cast [[expr.static.cast]](https://wg21.link/expr.static.cast)

Change 7.6.1.9 [[expr.static.cast]](https://wg21.link/expr.static.cast) paragraph 1 as follows:

> > static-cast-expression
> > 
> > static_cast
> > 
> > <
> > 
> > type-id
> > 
> > >
> > 
> > (
> > 
> > expression
> > 
> > )
> 
> 1 <del>The result of the expression `static_cast<T>(v)` is the result of converting the expression `v` to type `T`.</del> <ins>The result of a static-cast-expression is the result of converting the expression `v` to the type `T` designated by the type-id.</ins> If `T` is an lvalue reference type or an rvalue reference to function type, the result is an lvalue; if `T` is an rvalue reference to object type, the result is an xvalue; otherwise, the result is a prvalue.
> 
> > [*Note:* The `>` token following the type-id can be the product of replacing a `>>` token by two consecutive `>` tokens (13.3 [[temp.names]](https://wg21.link/temp.names)). — *end note* ]

### Reinterpret cast [[expr.reinterpret.cast]](https://wg21.link/expr.reinterpret.cast)

Change 7.6.1.10 [[expr.reinterpret.cast]](https://wg21.link/expr.reinterpret.cast) paragraph 1 as follows:

> > reinterpret-cast-expression
> > 
> > > reinterpret_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> 
> 1 <del>The result of the expression `reinterpret_cast<T>(v)` is the result of converting the expression `v` to type `T`.</del> <ins>The result of a reinterpret-cast-expression is the result of converting the expression `v` to the type `T` designated by the type-id.</ins> If `T` is an lvalue reference type or an rvalue reference to function type, the result is an lvalue; if `T` is an rvalue reference to object type, the result is an xvalue; otherwise, the result is a prvalue and the lvalue-to-rvalue, array-to-pointer, and function-to-pointer standard conversions are performed on the expression `v`. Conversions that can be performed explicitly using `reinterpret_cast` are listed below. No other conversion can be performed explicitly using `reinterpret_cast`.
> 
> > [*Note:* The `>` token following the type-id can be the product of replacing a `>>` token by two consecutive `>` tokens (13.3 [[temp.names]](https://wg21.link/temp.names)). — *end note* ]

### Const cast [[expr.const.cast]](https://wg21.link/expr.const.cast)

Change 7.6.1.11 [[expr.const.cast]](https://wg21.link/expr.const.cast) paragraph 1 as follows:

> > const-cast-expression
> > 
> > > const_cast
> > > 
> > > <
> > > 
> > > type-id
> > > 
> > > >
> > > 
> > > (
> > > 
> > > expression
> > > 
> > > )
> 
> 1 <del>The result of the `const_cast<T>(v)` is of type `T`.</del> <ins>The result of a const-cast-expression is the result of converting the expression `v` to the type `T` designated by the type-id.</ins> If `T` is an lvalue reference to object type, the result is an lvalue; if `T` is an rvalue reference to object type, the result is an xvalue; otherwise, the result is a prvalue and the lvalue-to-rvalue, array-to-pointer, and function-to-pointer standard conversions are performed on the expression `v`. The temporary materialization conversion is not performed on `v`, other than as specified below. Conversions that can be performed explicitly using `const_cast` are listed below. No other conversion shall be performed explicitly using `const_cast`.
> 
> > [*Note:* The `>` token following the type-id can be the product of replacing a `>>` token by two consecutive `>` tokens (13.3 [[temp.names]](https://wg21.link/temp.names)). — *end note* ]

## Overload resolution [[over]](https://wg21.link/over)

### Function call syntax [[over.match.call.general]](https://wg21.link/over.match.call.general)

Change 12.2.2.2.1 [[over.match.call.general]](https://wg21.link/over.match.call.general) paragraph 1 as follows:

> 1 In a function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call))
> 
> > postfix-expression
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )
> 
> <del>if</del> <ins>If</ins> the postfix-expression <ins>of a function-call-expression</ins> names at least one function or function template, overload resolution is applied as specified in 12.2.2.2.2 [[over.call.func]](https://wg21.link/over.call.func). If the postfix-expression denotes an object of class type, overload resolution is applied as specified in 12.2.2.2.3 [[over.call.object]](https://wg21.link/over.call.object).

### Call to designated function
[[over.call.func]](https://wg21.link/over.call.func)

Apply the following changes to the entire subclause 12.2.2.2.2 [[over.call.func]](https://wg21.link/over.call.func):

> 1 Of interest in 12.2.2.2.2 [[over.call.func]](https://wg21.link/over.call.func) are only those function calls in which the postfix-expression ultimately contains an id-expression or splice-expression that designates one or more functions. Such a postfix-expression, perhaps nested arbitrarily deep in parentheses, has one of the following forms:
> 
> > postfix-expression
> > 
> > :
> > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > .
> > > 
> > > splice-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > id-expression
> > > 
> > > postfix-expression
> > > 
> > > ->
> > > 
> > > splice-expression
> > > 
> > > id-expression
> > > 
> > > splice-expression
> 
> These represent two syntactic subcategories of function calls: qualified function calls and unqualified function calls.
> 
> 2 *Qualified function call* is a function-call-expression whose postfix-expression, perhaps nested arbitrarily deep in parentheses, has one of the following forms:
> 
> > postfix-expression
> > 
> > .
> > 
> > id-expression
> > 
> > postfix-expression
> > 
> > .
> > 
> > splice-expression
> > 
> > postfix-expression
> > 
> > ->
> > 
> > id-expression
> > 
> > postfix-expression
> > 
> > ->
> > 
> > splice-expression
> 
> In <del>qualified function</del> <ins>such</ins> calls, the function is designated by an id-expression or splice-expression *E* <del>preceded by an `->` or `.` operator</del>. Since the construct `A->B` is generally equivalent to `(*A).B`, the rest of Clause 12 [[over]](https://wg21.link/over) assumes, without loss of generality, that all member function calls have been normalized to the form that uses an object and the `.` operator. Furthermore, Clause 12 [[over]](https://wg21.link/over) assumes that the postfix-expression that is the left operand of the `.` operator has type “*cv* `T`” where `T` denotes a class.<sup>94</sup> The set of candidate functions either is the set found by name lookup (6.5.2 [[class.member.lookup]](https://wg21.link/class.member.lookup)) if *E* is an id-expression or is the set determined as specified in 7.5.9 [[expr.prim.splice]](https://wg21.link/expr.prim.splice) if *E* is a splice-expression. The argument list <del>is the expression-list in the call</del> <ins>consists of the arguments of the function-call-expression</ins> augmented by the addition of the left operand of the `.` operator in the normalized member function call as the implied object argument (12.2.2 [[over.match.funcs]](https://wg21.link/over.match.funcs)).
> 
> 3 *Unqualified function call* is a function-call-expression whose postfix-expression, perhaps nested arbitrarily deep in parentheses, has one of the following forms:
> 
> > id-expression
> > 
> > splice-expression
> 
> In <del>unqualified function</del> <ins>such</ins> calls, the function is designated by an id-expression or a splice-expression *E*. The set of candidate functions either is the set found by name lookup (6.5 [[basic.lookup]](https://wg21.link/basic.lookup)) if *E* is an id-expression or is the set determined as specified in 7.5.9 [[expr.prim.splice]](https://wg21.link/expr.prim.splice) if *E* is a splice-expression. The set of candidate functions consists either entirely of non-member functions or entirely of member functions of some class `T`. In the former case or if *E* is either a splice-expression or the address of an overload set, the argument list <del>is the same as the expression-list in the call</del> <ins>consists of the arguments of the function-call-expression</ins>. Otherwise, the argument list <del>is the expression-list in the call</del> <ins>consists of the arguments of the function-call-expression</ins> augmented by the addition of an implied object argument as in a qualified function call. [. . .]
> 
> > [*Example:* [. . .] — *end example* ]

### Call to object of class type
[[over.call.object]](https://wg21.link/over.call.object)

Change 12.2.2.2.3 [[over.call.object]](https://wg21.link/over.call.object) paragraph 1 as follows:

> 1 If the postfix-expression *E* <del>in the function call syntax</del> <ins>of a function-call-expression</ins> evaluates to a class object of type “*cv* `T`”, then the set of candidate functions includes at least the function call operators of `T`. The function call operators of `T` are the results of a search for the name `operator()` in the scope of `T`.

### Function call [[over.call]](https://wg21.link/over.call)

Change 12.4.4 [[over.call]](https://wg21.link/over.call) paragraph 1 as follows:

> 1 A *function call operator function* is a function named `operator()` that is a member function with an arbitrary number of parameters. It may have default arguments. For <del>an expression of the form</del> <ins>a function-call-expression</ins>
> 
> > postfix-expression
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )
> 
> where the postfix-expression is of class type, the operator function is selected by overload resolution (12.2.2.2.3 [[over.call.object]](https://wg21.link/over.call.object)). If a surrogate call function is selected, let *e* be the result of invoking the corresponding conversion operator function on the postfix-expression;
> 
> the expression is interpreted as
> 
> > *e*
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )
> 
> Otherwise, the expression is interpreted as
> 
> > postfix-expression
> > 
> > .
> > 
> > operator ()
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )

### Subscripting [[over.sub]](https://wg21.link/over.sub)

Change 12.4.5 [[over.sub]](https://wg21.link/over.sub) paragraph 1 as follows:

> 1 A *subscripting operator* function is a member function named `operator[]` with an arbitrary number of parameters. It may have default arguments. For <del>an expression of the form</del> <ins>a subscript-expression</ins>
> 
> > postfix-expression
> > 
> > [
> > 
> > expression-list<sub>opt</sub>
> > 
> > ]
> 
> the operator function is selected by overload resolution (12.2.2.3 [[over.match.oper]](https://wg21.link/over.match.oper)). If a member function is selected, the expression is interpreted as
> 
> > postfix-expression
> > 
> > .
> > 
> > operator
> > 
> > []
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )

### Class member access [[over.ref]](https://wg21.link/over.ref)

Change 12.4.6 [[over.ref]](https://wg21.link/over.ref) paragraph 1 as follows:

> 1 A *class member access operator function* is a function named `operator->` that is a non-static member function taking no non-object parameters. For <del>an expression</del> <ins>a class-member-access-expression</ins> of the form
> 
> > postfix-expression
> > 
> > ->
> > 
> > template
> > 
> > <sub>opt</sub>
> > 
> > id-expression
> 
> the operator function is selected by overload resolution (12.2.2.3 [[over.match.oper]](https://wg21.link/over.match.oper)), and the expression is interpreted as
> 
> > (
> > 
> > postfix-expression
> > 
> > .
> > 
> > operator
> > 
> > ->
> > 
> > ()
> > 
> > )
> > 
> > ->
> > 
> > template
> > 
> > <sub>opt</sub>
> > 
> > id-expression
> 
> Analogously, for <del>an expression</del> <ins>a class-member-access-expression</ins> of the form
> 
> > postfix-expression
> > 
> > ->
> > 
> > splice-expression
> 
> the operator function is selected by overload resolution, and the expression is interpreted as
> 
> > (
> > 
> > postfix-expression
> > 
> > .
> > 
> > operator
> > 
> > ->
> > 
> > ()
> > 
> > )
> > 
> > ->
> > 
> > splice-expression

## The rest of the core language
wording

### One-defintion rule [[basic.def.odr]](https://wg21.link/basic.def.odr)

Change 6.3 [[basic.def.odr]](https://wg21.link/basic.def.odr) paragraph 3 as follows:

> 3 An expression or conversion is *potentially evaluated* unless it is an unevaluated operand (7.2.3 [[expr.context]](https://wg21.link/expr.context)), a subexpression thereof, or a conversion in an initialization or conversion sequence in such a context. The set of *potential results* of an expression *E* is defined as follows:
> 
> - [. . .]
> - (3.3) If *E* is a <del>class member access expression (7.6.1.5)</del> <ins>class-member-access-expression</ins> of the form *E*<sub>1</sub> `.` `template`<sub>opt</sub> *E*<sub>2</sub>, where *E*<sub>2</sub> designates a non-static data member or a direct base class relationship, the set contains the potential results of *E*<sub>1</sub>.
> - (3.4) If *E* is a <del>class member access expression</del> <ins>class-member-access-expression</ins> naming a static data member, the set contains the id-expression designating the data member.
> - [. . .]

### Unqualified name lookup [[basic.lookup.unqual]](https://wg21.link/basic.lookup.unqual)

Change 6.5.3 [[basic.lookup.unqual]](https://wg21.link/basic.lookup.unqual) paragraph 4 as follows:

> 4 An *unqualified name* is a name that does not immediately follow a nested-name-specifier or the `.` or `->` in a <del>class member access expression (7.6.1.5)</del> <ins>class-member-access-expression</ins>, possibly after a `template` keyword or `~`. Unless otherwise specified, such a name undergoes unqualified name lookup from the point where it appears.

### Argument-dependent name
lookup [[basic.lookup.argdep]](https://wg21.link/basic.lookup.argdep)

Change 6.5.4 [[basic.lookup.argdep]](https://wg21.link/basic.lookup.argdep) paragraph 1 as follows:

> 1 When the postfix-expression in a <del>function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call))</del> <ins>function-call-expression</ins> is an unqualified-id, and unqualified lookup (6.5.3 [[basic.lookup.unqual]](https://wg21.link/basic.lookup.unqual)) for the name in the unqualified-id does not find any
> 
> - (1.1) declaration of a class member, or
> - (1.2) function declaration inhabiting a block scope, or
> - (1.3) declaration not of a function or function template
> 
> then lookup for the name also includes the result of *argument-dependent lookup* in a set of associated namespaces that depends on the types of the arguments (and for type template template arguments, the namespace of the template argument), as specified below.
> 
> > [*Example:* [. . .] — *end example* ]

Change 6.5.4 [[basic.lookup.argdep]](https://wg21.link/basic.lookup.argdep) paragraph 2 as follows:

> 2
> 
> > [*Note:* For purposes of determining (during parsing) whether an expression is a postfix-expression <del>for a function call</del> <ins>of a function-call-expression</ins>, the usual name lookup rules apply. In some cases a name followed by `<` is treated as a template-name even though name lookup did not find a template-name (see 13.3 [[temp.names]](https://wg21.link/temp.names)). For example,
> > 
> > ```cpp
> > int h;
> > void g();
> > namespace N {
> >   struct A {};
> >   template <class T> int f(T);
> >   template <class T> int g(T);
> >   template <class T> int h(T);
> > }
> > 
> > int x = f<N::A>(N::A());        // OK, lookup of f finds nothing, f treated as template name
> > int y = g<N::A>(N::A());        // OK, lookup of g finds a function, g treated as template name
> > int z = h<N::A>(N::A());        // error: h< does not begin a template-id
> > ```
> > 
> > The rules have no effect on the syntactic interpretation of an expression. For example,
> > 
> > ```cpp
> > typedef int f;
> > namespace N {
> >   struct A {
> >     friend void f(A &);
> >     operator int();
> >     void g(A a) {
> >       int i = f(a);             // f is the typedef, not the friend function: equivalent to int(a)
> >     }
> >   };
> > }
> > ```
> > 
> > Because the expression is not a <del>function call</del> <ins>function-call-expression</ins>, argument-dependent name lookup does not apply and the friend function `f` is not found. — *end note* ]

### Qualified name lookup [[basic.lookup.qual.general]](https://wg21.link/basic.lookup.qual.general)

Change 6.5.5.1 [[basic.lookup.qual.general]](https://wg21.link/basic.lookup.qual.general) paragraph 2 as follows:

> 2 A *member-qualified name* is the (unique) component name (7.5.5.2 [[expr.prim.id.unqual]](https://wg21.link/expr.prim.id.unqual)), if any, of
> 
> - (2.1) an unqualified-id or
> - (2.2) a nested-name-specifier of the form type-name `::` or namespace-name `::`
> 
> in the id-expression of a <del>class member access expression (7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref))</del> <ins>class-member-access-expression</ins>. [. . .]
> 
> > [*Note:* [. . .] — *end note* ]
> 
> > [*Example:* [. . .] — *end example* ]

### Dynamic storage duration
[[basic.stc.dynamic]](https://wg21.link/basic.stc.dynamic)

Change 6.8.6.5.1 [[basic.stc.dynamic.general]](https://wg21.link/basic.stc.dynamic.general) paragraph 2 as follows:

> 2 [. . .]
> 
> > [*Note:* he implicit declarations do not introduce the names `std`, `std::size_t`, `std::align_val_t`, or any other names that the library uses to declare these names. Thus, a new-expression, delete-expression, or <del>function call</del> <ins>function-call-expression</ins> that refers to one of these functions without importing or including the header `<new>` (17.6.2 [[new.syn]](https://wg21.link/new.syn)) or importing a C++ library module (16.4.2.4 [[std.modules]](https://wg21.link/std.modules)) is well-formed. However, referring to `std` or `std::size_t` or `std::align_val_t` is ill-formed unless a standard library declaration (17.2.1 [[cstddef.syn]](https://wg21.link/cstddef.syn), 17.6.2 [[new.syn]](https://wg21.link/new.syn), 16.4.2.4 [[std.modules]](https://wg21.link/std.modules)) of that name precedes (6.5.1 [[basic.lookup.general]](https://wg21.link/basic.lookup.general)) the use of that name. — *end note* ]
> 
> [. . .]

### Sequential execution [[intro.execution]](https://wg21.link/intro.execution)

Change 6.10.1 [[intro.execution]](https://wg21.link/intro.execution) paragraph 11 as follows:

> 11 When invoking a function *f* (whether or not the function is inline), every argument expression and the <del>postfix expression</del> <ins>postfix-expression</ins> designating *f* are sequenced before every precondition assertion of *f* (9.4.1 [[dcl.contract.func]](https://wg21.link/dcl.contract.func)), which in turn are sequenced before every expression or statement in the body of *f*, which in turn are sequenced before every postcondition assertion of *f*.

### Names [[expr.prim.id.general]](https://wg21.link/expr.prim.id.general)

Change 7.5.5.1 [[expr.prim.id.general]](https://wg21.link/expr.prim.id.general) paragraph 2 as folows:

> 2 If an id-expression *E* denotes a non-static non-type member of some class `C` at a point where the current class (7.5.3 [[expr.prim.this]](https://wg21.link/expr.prim.this)) is `X` and
> 
> - (2.1) *E* is potentially evaluated or `C` is `X` or a base class of `X`, and
> - (2.2) *E* is not the id-expression of a <del>class member access expression (7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref))</del> <ins>class-member-access-expression</ins>, and
> - (2.3) *E* is not the id-expression of a reflect-expression (7.6.2.10 [[expr.reflect]](https://wg21.link/expr.reflect)), and
> - (2.4) if *E* is a qualified-id, *E* is not the un-parenthesized operand of the unary `&` operator (7.6.2.2 [[expr.unary.op]](https://wg21.link/expr.unary.op)),
> 
> the id-expression is transformed into a class member access expression using `(*this)` as the object expression. If this transformation occurs in the predicate of a precondition assertion of a constructor of `X` or a postcondition assertion of a destructor of `X`, the expression is ill-formed.
> 
> > [*Note:* If `C` is not `X` or a base class of `X`, the class member access expression is ill-formed. Also, if the id-expression occurs within a static or explicit object member function, the class member access is ill-formed. — *end note* ]
> 
> This transformation does not apply in the template definition context (13.8.3.2 [[temp.dep.type]](https://wg21.link/temp.dep.type)).
> 
> > [*Example:* [. . .] — *end example* ]

### Destruction [[expr.prim.id.dtor]](https://wg21.link/expr.prim.id.dtor)

Change 7.5.5.5 [[expr.prim.id.dtor]](https://wg21.link/expr.prim.id.dtor) paragraph 2 as follows:

> 2 If the id-expression names a pseudo-destructor, `T` shall be a scalar type and the id-expression shall appear as the right operand of a <del>class member access (7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref))</del> <ins>class-member-access-expression</ins> that forms the postfix-expression of a <del>function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call))</del> <ins>function-call-expression</ins>.

### Expression splicing [[expr.prim.splice]](https://wg21.link/expr.prim.splice)

Change 7.5.9 [[expr.prim.splice]](https://wg21.link/expr.prim.splice) paragraph 4 as follows:

> 4 For a splice-expression of the form template splice-specialization-specifier, the splice-specifier of the splice-specialization-specifier shall designate a template *T*.
> 
> - [. . .]
> 
> > [*Note:* Class members are accessible from any point when designated by splice-expressions (11.8.3 [[class.access.base]](https://wg21.link/class.access.base)). A <del>class member access expression (7.6.1.5)</del> <ins>class-member-access-expression</ins> whose right operand is a splice-expression is ill-formed if the left operand (considered as a pointer) cannot be implicitly converted to a pointer to the designating class of the right operand. — *end note* ]

### Comma operator [[expr.comma]](https://wg21.link/expr.comma)

Change 7.6.20 [[expr.comma]](https://wg21.link/expr.comma) paragraph 2 as follows:

> 2
> 
> > [*Note:* In contexts where the comma token is given special meaning (e.g., <del>function calls (7.6.1.3)</del> <ins>function-call-expressions</ins>, <del>subscript expressions (7.6.1.2)</del> <ins>subscript-expressions</ins>, <del>lists of initializers (9.5)</del> <ins>initialzer-lists</ins>, or template-argument-lists (13.3 [[temp.names]](https://wg21.link/temp.names))), the comma operator as described in this subclause can appear only in parentheses.
> > 
> > > [*Example:* [. . .] — *end example* ]
> > 
> >   — *end note* ]

### Core constant expressions
[[expr.const.core]](https://wg21.link/expr.const.core)

Change [[expr.const.core]](https://wg21.link/expr.const.core) paragraph 2 as follows:

> 2 An expression *E* is a *core constant expression* unless the evaluation of *E*, following the rules of the abstract machine (6.10.1 [[intro.execution]](https://wg21.link/intro.execution)), would evaluate one of the following:
> 
> - (2.1) `this` (7.5.3 [[expr.prim.this]](https://wg21.link/expr.prim.this)), except
>   - [. . .]
>   - (2.1.2) when appearing as the postfix-expression of an implicit or explicit <del>class member access expression (7.6.1.5 [[expr.ref]](https://wg21.link/expr.ref))</del> <ins>class-member-access-expression</ins>;
>   - [. . .]
> - [. . .]
> - (2.18) an invocation of a destructor (11.4.7 [[class.dtor]](https://wg21.link/class.dtor)) or a <del>function call</del> <ins>function-call-expression</ins> whose postfix-expression names a pseudo-destructor (7.6.1.3 [[expr.call]](https://wg21.link/expr.call)), in either case for an object whose lifetime did not begin within the evaluation of *E*;
> - [. . .]

### Default arguments [[dcl.fct.default]](https://wg21.link/dcl.fct.default)

Change 9.3.4.7 [[dcl.fct.default]](https://wg21.link/dcl.fct.default) paragraph 9 as follows:

> 9 A default argument is evaluated each time the function is called with no argument for the corresponding parameter. A parameter shall not appear as a potentially evaluated expression in a default argument.
> 
> > [*Note:* [. . .] — *end note* ]
> 
> > [*Example:* [. . .] — *end example* ]
> 
> A non-static member shall not be designated in a default argument unless
> 
> - (9.1) it is designated by the id-expression or splice-expression of a <del>class member access expression (7.6.1.5)</del> <ins>class-member-access-expression</ins>,
> - [. . .]
> 
> [. . .]

### Dependent names [[temp.dep.general]](https://wg21.link/temp.dep.general)

Change 13.8.3.1 [[temp.dep.general]](https://wg21.link/temp.dep.general) paragraph 2 as follows:

> 2 A <del>dependent call</del> <ins>*dependent call*</ins> is <del>an expression</del> <ins>a function-call-expression</ins>, possibly formed as a non-member candidate for an operator (12.2.2.3 [[over.match.oper]](https://wg21.link/over.match.oper)), <del>of the form:</del>
> 
> > postfix-expression
> > 
> > (
> > 
> > expression-list<sub>opt</sub>
> > 
> > )
> 
> <del>where the</del> <ins>whose</ins> postfix-expression is an unqualified-id and
> 
> - (2.1) any of the expressions in the expression-list is a pack expansion (13.7.4 [[temp.variadic]](https://wg21.link/temp.variadic)), or
> - (2.2) any of the expression or brace-init-lists in the expression-list is type-dependent (13.8.3.3 [[temp.dep.expr]](https://wg21.link/temp.dep.expr)), or
> - (2.3) the unqualified-id is a template-id in which any of the template arguments depends on a template parameters.
> 
> The component name of an unqualified-id (7.5.5.2 [[expr.prim.id.unqual]](https://wg21.link/expr.prim.id.unqual)) is dependent if
> 
> - (2.4) it is a conversion-function-id whose conversion-type-id is dependent, or
> - (2.5) it is `operator=` and the current class is a templated entity, or
> - (2.6) the unqualified-id is the postfix-expression in a dependent call.
> 
> > [*Note:* [. . .] — *end note* ]

### Type-dependent expressions
[[temp.dep.expr]](https://wg21.link/temp.dep.expr)

Do not change 13.8.3.3 [[temp.dep.expr]](https://wg21.link/temp.dep.expr) paragraph 3.

Change 13.8.3.3 [[temp.dep.expr]](https://wg21.link/temp.dep.expr) paragraph 4 as follows:

> 4 Expressions of the following forms are never type-dependent (because the type of the expression cannot be dependent):
> 
> > literal
> > 
> > sizeof
> > 
> > unary-expression
> > 
> > sizeof
> > 
> > (
> > 
> > type-id
> > 
> > )
> > 
> > sizeof
> > 
> > ...
> > 
> > (
> > 
> > identifier
> > 
> > )
> > 
> > alignof
> > 
> > (
> > 
> > type-id
> > 
> > )
> > 
> > <del>`typeid`
> > `(`
> > *expression*
> > `)`</del>
> > 
> > <del>`typeid`
> > `(` *type-id*
> > `)`</del>
> > 
> > <ins>*typeid-expression*</ins>
> > 
> > ::
> > 
> > <sub>opt</sub>
> > 
> > delete
> > 
> > cast-expression
> > 
> > ::
> > 
> > <sub>opt</sub>
> > 
> > delete
> > 
> > [
> > 
> > ]
> > 
> > cast-expression
> > 
> > throw
> > 
> > assignment-expression<sub>opt</sub>
> > 
> > noexcept
> > 
> > (
> > 
> > expression
> > 
> > )
> > 
> > requires-expression
> > 
> > reflect-expression
> 
> > [*Note:* For the standard library macro `offsetof`, see 17.2 [[support.types]](https://wg21.link/support.types). — *end note* ]

### Value-dependent expression
[[temp.dep.constexpr]](https://wg21.link/temp.dep.constexpr)

Do not change 13.8.3.4 [[temp.dep.constexpr]](https://wg21.link/temp.dep.constexpr) paragraphs 2 and 3.

### Deducing template arguments
from a type [[temp.deduct.type]](https://wg21.link/temp.deduct.type)

Change 13.10.3.6 [[temp.deduct.type]](https://wg21.link/temp.deduct.type) paragraph 23 as follows:

> 23 The template-argument corresponding to a template template parameter is deduced from the type of the template-argument of a class template specialization used in the argument list of a function call <ins>(12.2.2.2.2 [[over.call.func]](https://wg21.link/over.call.func))</ins>.
> 
> > [*Example:* [. . .] — *end example* ]

### Exception specifications
[[except.spec]](https://wg21.link/except.spec)

Change 14.5 [[except.spec]](https://wg21.link/except.spec) paragraph 5 as follows:

> 5 An expression *E* is *potentially-throwing* if
> 
> - (5.1) *E* is a <del>function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call))</del> <ins>function-call-expression</ins> whose postfix-expression has a function type, or a pointer-to-function type, with a potentially-throwing exception specification, or
> - [. . .]

## Library wording

### Algorithm function objects
[[alg.func.obj]](https://wg21.link/alg.func.obj)

Change 16.3.3.4 [[alg.func.obj]](https://wg21.link/alg.func.obj) paragraph 2 as follows:

> 2 For an algorithm function object `o`, let *S* be the corresponding set of function templates. Then for any sequence of arguments `args . . .`, `o(args . . . )` is expression-equivalent to `s(args . . . )`, where the result of name lookup for `s` is the overload set *S*.
> 
> > [*Note:* Algorithm function objects are not found by argument-dependent name lookup (6.5.4 [[basic.lookup.argdep]](https://wg21.link/basic.lookup.argdep)). When found by unqualified name lookup (6.5.3 [[basic.lookup.unqual]](https://wg21.link/basic.lookup.unqual)) for the postfix-expression in a <del>function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call))</del> <ins>function-call-expression</ins>, they inhibit argument-dependent name lookup.
> > 
> > > [*Example:* 
> > > 
> > > ```cpp
> > > void foo() {
> > >   using namespace std::ranges;
> > >   std::vector<int> vec{1,2,3};
> > >   find(begin(vec), end(vec), 2);             // #1
> > > }
> > > ```
> > > 
> > > The <del>function call expression</del> <ins>function-call-expression</ins> at #1 invokes `std::ranges::find`, not `std::find`. — *end example* ]
> > 
> >   — *end note* ]

### Creation [[support.srcloc.cons]](https://wg21.link/support.srcloc.cons)

Change 17.8.2.2 [[support.srcloc.cons]](https://wg21.link/support.srcloc.cons) paragraph 1 as follows:

> ```cpp
> static consteval source_location current() noexcept;
> ```
> 
> > 1 *Returns*:
> > 
> > - (1.1) When invoked by a <del>function call</del> <ins>function-call-expression</ins> whose postfix-expression is a (possibly parenthesized) id-expression naming `current`, returns a `source_location` with an implementation-defined value. [. . .]
> > - [. . .]

### Function objects [[function.objects.general]](https://wg21.link/function.objects.general)

Change 22.10.1 [[function.objects.general]](https://wg21.link/function.objects.general) paragraph 1 as follows:

> 1 A function object type is an object type (6.9.1 [[basic.types.general]](https://wg21.link/basic.types.general)) that can be the type of the postfix-expression in a <del>function call (7.6.1.3 [[expr.call]](https://wg21.link/expr.call), 12.2.2.2 [[over.match.call]](https://wg21.link/over.match.call))</del> <ins>function-call-expression</ins>.<sup>174</sup>
