[basic.stc.dynamic.general], [func.wrap.func], [any.class.general] "Dynamically allocated" is not defined
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
In a number of normative paragraphs, we use the term "dynamically allocated", but it is never defined:
- "Objects can be created dynamically" ([basic.stc.dynamic.general] p1)
- "Implementations should avoid the use of dynamically allocated memory for small callable objects"
- "Implementations should avoid the use of dynamically allocated memory for a small contained value"
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 https://github.com/cplusplus/draft/pull/7260.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with [basic.stc.dynamic.general] p1 and the referenced [func.wrap.func.con], [func.wrap.move.class], [func.wrap.copy.class], and [any.class.general] paragraphs. Compare the uses of “dynamically allocated” with the suggested wording about dynamic storage duration or allocation functions. Done means the affected normative paragraphs use a defined, consistent term and the duplicated std::function recommendations have been considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100