cplusplus / cplusplus/draft

[basic.stc.dynamic.general], [func.wrap.func], [any.class.general] "Dynamically allocated" is not defined

Open
#7,261 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2-Bug
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:

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.