Skip to content
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

[func.wrap.func.con], [func.wrap.move.class], [func.wrap.copy.class], [any.class.general] Reword avoidance of 'dynamically allocated memory' as 'nesting an object within' #7328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
26 changes: 15 additions & 11 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6550,7 +6550,8 @@
The non-member \tcode{any_cast} functions provide type-safe access to the contained value.

\pnum
Implementations should avoid the use of dynamically allocated memory for a small contained value.
Implementations should nest an object within\iref{intro.object}
an object of type \tcode{any} for a small contained value.
However, any such small-object optimization shall only be applied to types \tcode{T} for which
\tcode{is_nothrow_move_constructible_v<T>} is \tcode{true}.
\begin{example}
Expand Down Expand Up @@ -13181,8 +13182,9 @@

\pnum
\recommended
Implementations should avoid the use of
dynamically allocated memory for small callable objects, for example, where
Implementations should nest an object within\iref{intro.object}
a \tcode{function} for small callable objects,
for example, where
\tcode{f}'s target is an object holding only a pointer or reference
to an object and a member function pointer.
\end{itemdescr}
Expand All @@ -13202,8 +13204,9 @@

\pnum
\recommended
Implementations should avoid the use of
dynamically allocated memory for small callable objects, for example,
Implementations should nest an object within\iref{intro.object}
a \tcode{function} for small callable objects,
for example,
where \tcode{f}'s target is an object holding only a pointer or reference
to an object and a member function pointer.
\end{itemdescr}
Expand Down Expand Up @@ -13265,8 +13268,9 @@

\pnum
\recommended
Implementations should avoid the use of
dynamically allocated memory for small callable objects, for example,
Implementations should nest an object within\iref{intro.object}
a \tcode{function} for small callable objects,
for example,
where \tcode{f} refers to an object holding only a pointer or
reference to an object and a member function pointer.
\end{itemdescr}
Expand Down Expand Up @@ -13583,8 +13587,8 @@

\pnum
\recommended
Implementations should avoid the use of dynamically allocated memory
for a small contained value.
Implementations should nest an object within\iref{intro.object}
a \tcode{move_only_function} for a small contained value.
\begin{note}
Such small-object optimization can only be applied to a type \tcode{T}
for which \tcode{is_nothrow_move_constructible_v<T>} is \tcode{true}.
Expand Down Expand Up @@ -13978,8 +13982,8 @@

\pnum
\recommended
Implementations should avoid the use of dynamically allocated memory
for a small contained value.
Implementations should nest an object within\iref{intro.object}
a \tcode{copyable_function} for a small contained value.
\begin{note}
Such small-object optimization can only be applied to a type \tcode{T}
for which \tcode{is_nothrow_move_constructible_v<T>} is \tcode{true}.
Expand Down
Loading