Skip to content

Commit c1f9b30

Browse files
jensmaurertkoeppe
authored andcommitted
[support.types.layout], [diff.offsetof] Use \placeholder for meta-variables in offsetof, not \textit and not \grammarterm (#1058)
Fixes #456.
1 parent 96b4cd2 commit c1f9b30

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

source/compatibility.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1916,13 +1916,13 @@
19161916

19171917
Subclause \ref{csetjmp.syn} describes the changes.
19181918

1919-
\rSec3[diff.offsetof]{Macro \tcode{offsetof(type, member-designator)}}
1919+
\rSec3[diff.offsetof]{Macro \tcode{offsetof(\placeholder{type}, \placeholder{member-designator})}}
19201920
\indexlibrary{\idxcode{offsetof}}%
19211921

19221922
\pnum
19231923
The macro \tcode{offsetof}, defined in
19241924
\tcode{<cstddef>}~(\ref{cstddef.syn})\indexlibrary{\idxhdr{cstddef}},
1925-
accepts a restricted set of \tcode{type} arguments in this International Standard.
1925+
accepts a restricted set of \tcode{\placeholder{type}} arguments in this International Standard.
19261926
Subclause \ref{support.types.layout} describes the change.
19271927

19281928
\rSec3[diff.malloc]{Memory allocation functions}

source/support.tex

+6-7
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,24 @@
256256
\pnum
257257
The macro
258258
\indexlibrary{\idxcode{offsetof}}%
259-
\tcode{offsetof}(\textit{type},
260-
\grammarterm{member-designator})
259+
\tcode{offsetof(\placeholder{type}, \placeholder{member-designator})}
261260
has the same semantics as the corresponding macro in
262261
the C standard library header \tcode{<stddef.h>}, but
263-
accepts a restricted set of \textit{type}
262+
accepts a restricted set of \tcode{\placeholder{type}}
264263
arguments in this International Standard.
265-
Use of the \tcode{offsetof} macro with a \textit{type}
264+
Use of the \tcode{offsetof} macro with a \tcode{\placeholder{type}}
266265
other than a standard-layout class (Clause~\ref{class})
267266
is conditionally-supported.\footnote{Note that \tcode{offsetof}
268267
is required to work as specified even if unary
269268
\tcode{operator\&}
270269
is overloaded for any of the types involved.}
271-
The expression \tcode{offsetof}(\textit{type}, \grammarterm{member-designator})
270+
The expression \tcode{offsetof(\placeholder{type}, \placeholder{member-designator})}
272271
is never type-dependent~(\ref{temp.dep.expr}) and it is
273-
value-dependent~(\ref{temp.dep.constexpr}) if and only if \textit{type} is
272+
value-dependent~(\ref{temp.dep.constexpr}) if and only if \tcode{\placeholder{type}} is
274273
dependent. The result of applying the \tcode{offsetof} macro to
275274
a static data member or a function member is undefined.
276275
No operation invoked by the \tcode{offsetof} macro shall throw an exception and
277-
\tcode{noexcept(offsetof(type, member-designator))} shall be \tcode{true}.
276+
\tcode{noexcept(offsetof(\placeholder{type}, \placeholder{member-designator}))} shall be \tcode{true}.
278277

279278
\pnum
280279
The type \tcode{ptrdiff_t} is an

0 commit comments

Comments
 (0)