|
1896 | 1896 |
|
1897 | 1897 | \pnum
|
1898 | 1898 | A type \tcode{T} containing a placeholder type,
|
1899 |
| -and a corresponding initializer $E$, |
| 1899 | +and a corresponding \grammarterm{initializer-clause} $E$, |
1900 | 1900 | are determined as follows:
|
1901 | 1901 | \begin{itemize}
|
1902 | 1902 | \item
|
1903 |
| -for a non-discarded \tcode{return} statement that occurs |
| 1903 | +For a non-discarded \tcode{return} statement that occurs |
1904 | 1904 | in a function declared with a return type
|
1905 | 1905 | that contains a placeholder type,
|
1906 | 1906 | \tcode{T} is the declared return type
|
1907 |
| -and $E$ is the operand of the \tcode{return} statement. |
| 1907 | +and $E$ is the operand of the \tcode{return} statement; |
| 1908 | +if the operand is an \grammarterm{expression} $X$ |
| 1909 | +that is not an \grammarterm{assignment-expression}\iref{expr.comma}, |
| 1910 | +$E$ is \tcode{($X$)}. |
1908 | 1911 | If the \tcode{return} statement
|
1909 | 1912 | has no operand,
|
1910 |
| -then $E$ is \tcode{void()}; |
| 1913 | +then $E$ is \tcode{void()}. |
1911 | 1914 | \item
|
1912 |
| -for a variable declared with a type |
| 1915 | +For a variable declared with a type |
1913 | 1916 | that contains a placeholder type,
|
1914 |
| -\tcode{T} is the declared type of the variable |
1915 |
| -and $E$ is the initializer. |
| 1917 | +\tcode{T} is the declared type of the variable. |
| 1918 | +If the initializer of the variable is a \grammarterm{brace-or-equal-initializer} |
| 1919 | +of the form \tcode{= \grammarterm{initializer-clause}}, |
| 1920 | +$E$ is the \grammarterm{initializer-clause}. |
1916 | 1921 | If the initialization is direct-list-initialization,
|
1917 | 1922 | the initializer shall be a \grammarterm{braced-init-list}
|
1918 | 1923 | containing only a single \grammarterm{assignment-expression}
|
1919 |
| -and $E$ is the \grammarterm{assignment-expression}; |
| 1924 | +and $E$ is the \grammarterm{assignment-expression}. |
| 1925 | +Otherwise, $E$ is the initializer. |
1920 | 1926 | \item
|
1921 |
| -for a non-type template parameter declared with a type |
| 1927 | +For a non-type template parameter declared with a type |
1922 | 1928 | that contains a placeholder type,
|
1923 | 1929 | \tcode{T} is the declared type of the non-type template parameter
|
1924 | 1930 | and $E$ is the corresponding template argument.
|
|
0 commit comments