Skip to content

Commit 555cd0f

Browse files
committed
[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'
1 parent a470ff8 commit 555cd0f

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

source/utilities.tex

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6550,7 +6550,8 @@
65506550
The non-member \tcode{any_cast} functions provide type-safe access to the contained value.
65516551

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

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

1320313205
\pnum
1320413206
\recommended
13205-
Implementations should avoid the use of
13206-
dynamically allocated memory for small callable objects, for example,
13207+
Implementations should nest an object within\iref{intro.object}
13208+
a \tcode{function} for small callable objects,
13209+
for example,
1320713210
where \tcode{f}'s target is an object holding only a pointer or reference
1320813211
to an object and a member function pointer.
1320913212
\end{itemdescr}
@@ -13265,8 +13268,9 @@
1326513268

1326613269
\pnum
1326713270
\recommended
13268-
Implementations should avoid the use of
13269-
dynamically allocated memory for small callable objects, for example,
13271+
Implementations should nest an object within\iref{intro.object}
13272+
a \tcode{function} for small callable objects,
13273+
for example,
1327013274
where \tcode{f} refers to an object holding only a pointer or
1327113275
reference to an object and a member function pointer.
1327213276
\end{itemdescr}
@@ -13583,8 +13587,8 @@
1358313587

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

1397913983
\pnum
1398013984
\recommended
13981-
Implementations should avoid the use of dynamically allocated memory
13982-
for a small contained value.
13985+
Implementations should nest an object within\iref{intro.object}
13986+
a \tcode{copyable_function} for a small contained value.
1398313987
\begin{note}
1398413988
Such small-object optimization can only be applied to a type \tcode{T}
1398513989
for which \tcode{is_nothrow_move_constructible_v<T>} is \tcode{true}.

0 commit comments

Comments
 (0)