Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions tests/std/tests/P0896R4_ranges_alg_shuffle/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <algorithm>
#include <cassert>
#include <concepts>
#include <cstdint>
#include <cstdio>
#include <random>
#include <ranges>
Expand Down Expand Up @@ -53,14 +54,15 @@ struct instantiator {

void test_urbg() { // COMPILE-ONLY
struct RandGen {
static constexpr bool min() {
return false;
using result_type = uint16_t; // N5014 [rand.req.urng]/3
static constexpr result_type min() {
return 3;
}
static constexpr bool max() {
return true;
static constexpr result_type max() {
return 1729;
}
bool operator()() & {
return false;
result_type operator()() & {
return 4;
Comment on lines +57 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to be triple sure - these numbers are completely arbitrary, right? I'd be a fan of calling that out, but I won't insist.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a compile-time only test, and the actual values involved are not relevant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made a note to add comments to this generator in a followup PR.

}
};

Expand Down