You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could generally fix this problem by talking about
objects with dynamic storage duration
... instead of
dynamically allocated objects
... or by talking about allocation functions.
Implementations should avoid the use of
-dynamically allocated memory+storage obtained through allocation functions
for a small contained value.
Also, I'm not too hyped about the recommended practice being copied and pasted into three separate std::function constructors, but it's not the end of the world.
Note: I've noticed this issue when working on #7260.
The text was updated successfully, but these errors were encountered:
Perhaps it's more consistent to say the way round (LWG4141) - implementations should make the small contained object nested within the constructed object.
I think there should be a follow-up LWG issue to ensure that when the target object is a function pointer or a reference_wrapper, it's always nested within the type-erased wrapper object. The current wording is too loose to ensure this.
In a number of normative paragraphs, we use the term "dynamically allocated", but it is never defined:
We could generally fix this problem by talking about
... instead of
... or by talking about allocation functions.
Also, I'm not too hyped about the recommended practice being copied and pasted into three separate
std::function
constructors, but it's not the end of the world.Note: I've noticed this issue when working on #7260.
The text was updated successfully, but these errors were encountered: