This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.
seed_seq
Section: 29.5.8.1 [rand.util.seedseq] Status: NAD Submitter: Stephan Tolksdorf Opened: 2007-09-21 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [rand.util.seedseq].
View all issues with NAD status.
Discussion:
The proper way to seed random number engines seems to be the most frequently
discussed issue of the 29.5 [rand] proposal. While the new seed_seq
approach is already rather
general and probably sufficient for most situations, it is unlikely to be optimal in every case (one
problem was pointed out in point T5 above). In some situations it might, for instance, be better to
seed the state with a cryptographic generator.
In my opinion this is a pretty strong argument for extending the standard with a simple facility to customize the seeding procedure. This could, for example, be done with the following minimal changes:
Possible resolution:
seed_seq
as a default implementation of the SeedSeq interface.
Supplement the seed_seq
with a traits class
template <typename T> struct is_seed_seq { static const bool value = false; }
and the specialization
template <> struct is_seed_seq<seed_seq> { static const bool value = true; }
which users can supplement with further specializations.
[ Bellevue: ]
See N2424. Close NAD but note that "conceptizing" the library may cause this problem to be solved by that route.
Proposed resolution:
See N2424 for the proposed resolution.