Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[alg.random.sample] Remove redundant requirement #2798

Merged
merged 1 commit into from Jun 11, 2019

Conversation

CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Mar 17, 2019

Per [rand.req.urng]/1, the result type of a UniformRandomBitGenerator must model UnsignedIntegral, i.e., it must be an integral type. [alg.random.sample]/1.5 requires Distance to be an integer type. Since all integer types are convertible to all other integer types, the result type of any UniformRandomBitGenerator is convertible to Distance. The library need not enforce the rules of the core language.

Per [rand.req.urng]/1, the result type of a `UniformRandomBitGenerator` must model `UnsignedIntegral`, i.e., it must be an integral type. [alg.random.sample]/1.5 requires `Distance` to be an integer type. Since all integer types are convertible to all other integer types, the result type of any `UniformRandomBitGenerator` is convertible to `Distance`. The library need not enforce the rules of the core language.
@jensmaurer jensmaurer merged commit 18e005d into cplusplus:master Jun 11, 2019
@CaseyCarter CaseyCarter deleted the sample branch June 11, 2019 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants