Skip to content

[support.types.layout], [diff.offsetof] Use \placeholder #1058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1916,13 +1916,13 @@

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

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

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

\rSec3[diff.malloc]{Memory allocation functions}
Expand Down
14 changes: 7 additions & 7 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -256,25 +256,25 @@
\pnum
The macro
\indexlibrary{\idxcode{offsetof}}%
\tcode{offsetof}(\textit{type},
\grammarterm{member-designator})
\tcode{offsetof}(\placeholder{type},
\placeholder{member-designator})
has the same semantics as the corresponding macro in
the C standard library header \tcode{<stddef.h>}, but
accepts a restricted set of \textit{type}
accepts a restricted set of \placeholder{type}
arguments in this International Standard.
Use of the \tcode{offsetof} macro with a \textit{type}
Use of the \tcode{offsetof} macro with a \placeholder{type}
other than a standard-layout class (Clause~\ref{class})
is conditionally-supported.\footnote{Note that \tcode{offsetof}
is required to work as specified even if unary
\tcode{operator\&}
is overloaded for any of the types involved.}
The expression \tcode{offsetof}(\textit{type}, \grammarterm{member-designator})
The expression \tcode{offsetof}(\placeholder{type}, \placeholder{member-designator})
is never type-dependent~(\ref{temp.dep.expr}) and it is
value-dependent~(\ref{temp.dep.constexpr}) if and only if \textit{type} is
value-dependent~(\ref{temp.dep.constexpr}) if and only if \placeholder{type} is
dependent. The result of applying the \tcode{offsetof} macro to
a static data member or a function member is undefined.
No operation invoked by the \tcode{offsetof} macro shall throw an exception and
\tcode{noexcept(offsetof(type, member-designator))} shall be \tcode{true}.
\tcode{noexcept(offsetof(\placeholder{type}, \placeholder{member-designator}))} shall be \tcode{true}.

\pnum
The type \tcode{ptrdiff_t} is an
Expand Down