cplusplus / cplusplus/draft

[rand.eng.mers] should use math font for (1u<<w)-1u

Open
#4,292 6 comments 0 reactions 1 assignee View on GitHub

@jwakely is already working on this.

Since Oct 8, 2020.

Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

In [rand.eng.mers] p4 the expression (1u<<w) - 1u is used repeatedly. If w==numeric_limits<unsigned>::digits that is ill-formed.

In the synopsis above we use { return 2w - 1; } despite that being actual C++ code, so why can't we do the same in the prose that follows it?

i.e. replace the code font expressions like a <= (1u<<w) - 1u with a ≤ 2w - 1 to be clear that the rules of C++ unsigned integer arithmetic do not apply.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.