Example "uninit" in [dcl.constexpr] no longer valid
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
We discovered during the application of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2448r2.html (which removes one incorrect example) that there is another incorrect example in dcl.constexpr, Example 2 in (3.4):
constexpr int uninit() {
struct { int a; } s;
return s.a; // error: uninitialized read of s.a
}
@zygoloid says, "Yeah, it's an uninitialized read, but prior to p2448r2 that was IFNDR and now it's simply valid."
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
Locate [dcl.constexpr], Example 2 in the draft source and read the surrounding wording alongside P2448R2. Confirm how this example should be represented under the current rule, then build the draft or run its relevant validation to ensure the example and surrounding text are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100