This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
Section: 28.5.8.1 [rand.util.seedseq] Status: WP Submitter: Jiang An Opened: 2020-03-25 Last modified: 2021-10-14
Priority: 3
View all other issues in [rand.util.seedseq].
View all issues with WP status.
Discussion:
28.5.8.1 [rand.util.seedseq] says that std::seed_seq has following 3 constructors:
#1: seed_seq()
#2: template<class T> seed_seq(initializer_list<T> il)
#3: template<class InputIterator> seed_seq(InputIterator begin, InputIterator end)
#include <random> #include <vector> int main() { std::vector<int> v(32); std::seed_seq{std::begin(v), std::end(v)}; // error: #2 matched and T is not an integer type std::seed_seq(std::begin(v), std::end(v)); // OK }
#3 should be made available in list-initialization by changing Mandates in 28.5.8.1 [rand.util.seedseq]/3 to Constraints IMO.
[2020-04-18 Issue Prioritization]
Priority to 3 after reflector discussion.
[2021-06-23; Reflector poll]
Set status to Tentatively Ready after five votes in favour during reflector poll.
[2021-10-14 Approved at October 2021 virtual plenary. Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4861.
Modify 28.5.8.1 [rand.util.seedseq] as indicated:
class seed_seq { public: // types using result_type = uint_least32_t; // constructors seed_seq() noexcept; […] };
seed_seq() noexcept;-1- Postconditions: v.empty() is true.
-2- Throws: Nothing.template<class T> seed_seq(initializer_list<T> il);-3- Constraints
-4- Effects: Same as seed_seq(il.begin(), il.end()).Mandates: T is an integer type.