|
3559 | 3559 | Otherwise, if the type contains a placeholder type,
|
3560 | 3560 | it is replaced by the type
|
3561 | 3561 | determined by placeholder type deduction\iref{dcl.type.auto.deduct}.
|
| 3562 | +Let \tcode{T} denote the resulting type. |
| 3563 | +Then: |
| 3564 | + |
| 3565 | +\begin{itemize} |
| 3566 | +\item |
| 3567 | +If the initializer is a parenthesized single expression, |
| 3568 | +the type conversion expression is equivalent |
| 3569 | +to the corresponding cast |
| 3570 | +expression\iref{expr.cast}. |
| 3571 | + |
| 3572 | +\item |
| 3573 | +\indextext{type!incomplete}% |
| 3574 | +Otherwise, if \tcode{T} is \cv{}~\keyword{void}, |
| 3575 | +the initializer shall be \tcode{()} or \tcode{\{\}} |
| 3576 | +(after pack expansion, if any), and |
| 3577 | +the expression is a prvalue of type \keyword{void} |
| 3578 | +that performs no initialization. |
| 3579 | + |
| 3580 | +\item |
| 3581 | +Otherwise, if \tcode{T} is a reference type, |
| 3582 | +the expression has the same effect as |
| 3583 | +direct-initializing an invented variable \tcode{t} of type \tcode{T} from |
| 3584 | +the initializer and then |
| 3585 | +using \tcode{t} as the result of the expression; |
| 3586 | +the result is an lvalue if |
| 3587 | +\tcode{T} is an lvalue reference type or |
| 3588 | +an rvalue reference to function type and |
| 3589 | +an xvalue otherwise. |
| 3590 | + |
| 3591 | +\item |
| 3592 | +Otherwise, |
| 3593 | +the expression is a prvalue of type \tcode{T} |
| 3594 | +whose result object is direct-initialized\iref{dcl.init} |
| 3595 | +with the initializer. |
| 3596 | +\end{itemize} |
| 3597 | + |
| 3598 | +If the initializer is a parenthesized optional \grammarterm{expression-list}, |
| 3599 | +\tcode{T} shall not be an array type. |
3562 | 3600 | \begin{example}
|
3563 | 3601 | \begin{codeblock}
|
3564 | 3602 | struct A {};
|
|
3573 | 3611 | \end{codeblock}
|
3574 | 3612 | \end{example}
|
3575 | 3613 |
|
3576 |
| -\pnum |
3577 |
| -If the initializer is a parenthesized single expression, |
3578 |
| -the type conversion expression is equivalent |
3579 |
| -to the corresponding cast |
3580 |
| -expression\iref{expr.cast}. |
3581 |
| -\indextext{type!incomplete}% |
3582 |
| -Otherwise, if the type is \cv{}~\keyword{void} |
3583 |
| -and the initializer is \tcode{()} or \tcode{\{\}} |
3584 |
| -(after pack expansion, if any), |
3585 |
| -the expression is a prvalue of type \keyword{void} |
3586 |
| -that performs no initialization. |
3587 |
| -Otherwise, |
3588 |
| -the expression is a prvalue of the specified type |
3589 |
| -whose result object is direct-initialized\iref{dcl.init} |
3590 |
| -with the initializer. |
3591 |
| -If the initializer is a parenthesized optional \grammarterm{expression-list}, |
3592 |
| -the specified type shall not be an array type. |
3593 |
| - |
3594 | 3614 | \rSec3[expr.ref]{Class member access}
|
3595 | 3615 |
|
3596 | 3616 | \pnum
|
|
0 commit comments