Skip to content
Merged
Changes from all commits
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
5 changes: 5 additions & 0 deletions stl/inc/random
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ public:

template <class _RanIt>
void generate(_RanIt _First, _RanIt _Last) const { // generate randomized interval from seeds
static_assert(_Is_any_of_v<remove_cv_t<typename iterator_traits<_RanIt>::value_type>, //
unsigned int, unsigned long, unsigned long long>,
"N4971 [rand.util.seedseq]/7 requires the value type of the iterator to be an unsigned type that is at "
"least 32-bit.");
Comment on lines +182 to +185

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No change requested: I wouldn't have used remove_cv_t here (elsewhere we assume that iterator_traits::value_type is cv-unqualified), and Casey Carter (@CaseyCarter) would have said "unsigned integer type" to match the Standard, but neither are worth resetting testing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm... [fs.path.req]/2.2 currently accepts a const-qualified value_type, but [fs.req]/3 doesn't seem so. Perhaps there should be an LWG issue for this.


_Adl_verify_range(_First, _Last);
auto _UFirst = _Get_unwrapped(_First);
const auto _Nx = static_cast<size_t>(_Get_unwrapped(_Last) - _UFirst);
Expand Down