Created on 2007-09-21.00:00:00 last changed 171 months ago
Proposed resolution:
See N2424 for the proposed resolution.
[ Bellevue: ]
See N2424. Close NAD but note that "conceptizing" the library may cause this problem to be solved by that route.
The proper way to seed random number engines seems to be the most frequently discussed issue of the [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:
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3585 |
2010-10-21 18:28:33 | admin | set | messages: + msg3584 |
2007-09-21 00:00:00 | admin | create |