Skip to content

Commit

Permalink
[func.wrap.func.con], [func.wrap.move.class], [func.wrap.copy.class],…
Browse files Browse the repository at this point in the history
… [any.class.general] Reword avoidance of 'dynamically allocated memory' as 'nesting an object within'
  • Loading branch information
Eisenwave committed Oct 20, 2024
1 parent a470ff8 commit 555cd0f
Showing 1 changed file with 15 additions and 11 deletions.
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

0 comments on commit 555cd0f

Please sign in to comment.