Skip to content

Commit 6d7b747

Browse files
author
Dawn Perchik
committed
[diff.cpp17.input.output] Add ill-formed comment and a still well-formed use.
1 parent 7118cb7 commit 6d7b747

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/compatibility.tex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,9 @@
20292029
Valid \CppXVII{} code may fail to compile in this International Standard:
20302030
\begin{codeblock}
20312031
auto p = new char[100];
2032-
std::cin >> std::setw(20) >> p;
2032+
char q[100];
2033+
std::cin >> std::setw(20) >> p; // ill-formed; previously well-formed
2034+
std::cin >> std::setw(20) >> q; // OK
20332035
\end{codeblock}
20342036

20352037
\rSec2[diff.cpp17.depr]{\ref{depr}: compatibility features}

0 commit comments

Comments
 (0)