|
6581 | 6581 | that is a function template whose first template parameter
|
6582 | 6582 | is a non-type parameter,
|
6583 | 6583 | the initializer is
|
6584 |
| -\tcode{\exposid{e}.get<i>()}. Otherwise, the initializer is \tcode{get<i>(\exposid{e})}, |
| 6584 | +\tcode{\exposidnc{e}.get<i>()}. Otherwise, the initializer is \tcode{get<i>(\exposid{e})}, |
6585 | 6585 | where \tcode{get} is looked up in the associated namespaces\iref{basic.lookup.argdep}.
|
6586 | 6586 | In either case, \tcode{get<i>} is interpreted as a \grammarterm{template-id}.
|
6587 | 6587 | \begin{note}
|
|
6610 | 6610 | all of \tcode{E}'s non-static data members
|
6611 | 6611 | shall be direct members of \tcode{E} or
|
6612 | 6612 | of the same base class of \tcode{E},
|
6613 |
| -well-formed when named as \tcode{\exposid{e}.\placeholder{name}} |
| 6613 | +well-formed when named as \tcode{\exposidnc{e}.\placeholder{name}} |
6614 | 6614 | in the context of the structured binding,
|
6615 | 6615 | \tcode{E} shall not have an anonymous union member, and
|
6616 | 6616 | the number of elements in the \grammarterm{identifier-list} shall be
|
|
6620 | 6620 | (in declaration order),
|
6621 | 6621 | each \tcode{v}$_i$ is the
|
6622 | 6622 | name of an lvalue that refers to the member \tcode{m}$_i$ of \exposid{e} and
|
6623 |
| -whose type is \cv{}~$\tcode{T}_i$, where $\tcode{T}_i$ is the declared type of |
6624 |
| -that member; the referenced type is \cv{}~$\tcode{T}_i$. The lvalue is a |
| 6623 | +whose type is |
| 6624 | +that of \tcode{\exposidnc{e}.$\tcode{m}_i$}\iref{expr.ref}; |
| 6625 | +the referenced type is |
| 6626 | +the declared type of $\tcode{m}_i$ if that type is a reference type, or |
| 6627 | +the type of \tcode{\exposidnc{e}.$\tcode{m}_i$} otherwise. |
| 6628 | +The lvalue is a |
6625 | 6629 | bit-field if that member is a bit-field.
|
6626 | 6630 | \begin{example}
|
6627 | 6631 | \begin{codeblock}
|
6628 |
| -struct S { int x1 : 2; volatile double y1; }; |
| 6632 | +struct S { mutable int x1 : 2; volatile double y1; }; |
6629 | 6633 | S f();
|
6630 | 6634 | const auto [ x, y ] = f();
|
6631 | 6635 | \end{codeblock}
|
6632 |
| -The type of the \grammarterm{id-expression} \tcode{x} is ``\tcode{const int}'', |
| 6636 | +The type of the \grammarterm{id-expression} \tcode{x} is ``\tcode{int}'', |
6633 | 6637 | the type of the \grammarterm{id-expression} \tcode{y} is ``\tcode{const volatile double}''.
|
6634 | 6638 | \end{example}
|
6635 | 6639 |
|
|
0 commit comments