Skip to content

Commit f41da80

Browse files
committed
[diff.expr] replace "declare" with "define"
It is always legal in C++ to declare new types in a sizeof expression or cast expression, but you can't *define* a new type in an expression.
1 parent 0fb3c13 commit f41da80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/compatibility.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,16 @@
250250
Common.
251251

252252
\ref{expr.sizeof}, \ref{expr.cast}
253-
\change Types must be declared in declarations, not in expressions
254-
In C, a sizeof expression or cast expression may create a new type.
253+
\change Types must be defined in declarations, not in expressions\\
254+
In C, a sizeof expression or cast expression may define a new type.
255255
For example,
256256
\begin{codeblock}
257257
p = (void*)(struct x {int i;} *)0;
258258
\end{codeblock}
259-
declares a new type, struct x .
259+
defines a new type, struct \tcode{x} .
260260
\rationale
261261
This prohibition helps to clarify the location of
262-
declarations in the source code.
262+
definitions in the source code.
263263
\effect
264264
Deletion of a semantically well-defined feature.
265265
\difficulty

0 commit comments

Comments
 (0)