Skip to content

[basic.align], [obj.lifetime], [new.delete] Clarify uses of "suitably aligned" #7863

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3547,6 +3547,7 @@
\indextext{object model|)}

\rSec2[basic.align]{Alignment}
\indextext{suitably aligned}%

\pnum
Object types have \defnx{alignment requirements}{alignment requirement!implementation-defined}\iref{basic.fundamental,basic.compound}
Expand Down
8 changes: 4 additions & 4 deletions source/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@
that is
a subset of the region of storage
reachable through\iref{basic.compound} \tcode{p} and
suitably aligned for the type \tcode{T}.
suitably aligned\iref{basic.align} for the type \tcode{T}.

\pnum
\effects
Expand Down Expand Up @@ -995,7 +995,7 @@

\pnum
\expects
\tcode{p} is suitably aligned for an array of \tcode{T} or is null.
\tcode{p} is suitably aligned\iref{basic.align} for an array of \tcode{T} or is null.
\tcode{n <= size_t(-1) / sizeof(T)} is \tcode{true}.
If \tcode{n > 0} is \tcode{true},
\range{(char*)p}{(char*)p + (n * sizeof(T))} denotes
Expand Down Expand Up @@ -1039,7 +1039,7 @@
\item
\range{result}{result + (last - first)} denotes a region of storage that
is a subset of the region reachable through \tcode{result}\iref{basic.compound}
and suitably aligned for the type \tcode{T}.
and suitably aligned\iref{basic.align} for the type \tcode{T}.
\item
No element in the range \range{first}{last} is a potentially-overlapping subobject.
\end{itemize}
Expand Down Expand Up @@ -1101,7 +1101,7 @@
\item
\range{result}{result + (last - first)} denotes a region of storage that is
a subset of the region reachable through \tcode{result}\iref{basic.compound}
and suitably aligned for the type \tcode{T}.
and suitably aligned\iref{basic.align} for the type \tcode{T}.
\item
No element in the range \range{first}{last} is a potentially-overlapping
subobject.
Expand Down
9 changes: 6 additions & 3 deletions source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2452,7 +2452,8 @@

\pnum
\required
Return a non-null pointer to suitably aligned storage\iref{basic.stc.dynamic},
Return a non-null pointer to storage
aligned as described in \ref{basic.stc.dynamic.allocation},
or else throw a
\tcode{bad_alloc}
\indexlibraryglobal{bad_alloc}%
Expand Down Expand Up @@ -2510,7 +2511,8 @@

\pnum
\required
Return a non-null pointer to suitably aligned storage\iref{basic.stc.dynamic},
Return a non-null pointer to storage
aligned as described in \ref{basic.stc.dynamic.allocation},
or else return a null pointer.
Each of these nothrow versions of
\tcode{operator new}
Expand Down Expand Up @@ -2762,7 +2764,8 @@

\pnum
\required
Return a non-null pointer to suitably aligned storage\iref{basic.stc.dynamic},
Return a non-null pointer to storage
aligned as described in \ref{basic.stc.dynamic.allocation},
or else return a null pointer.
Each of these nothrow versions of
\tcode{operator new[]}
Expand Down
Loading