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.
Section: 220.127.116.11 [tr1::tr.rand.eng.disc], 18.104.22.168 [tr1::tr.rand.eng.xor] Status: NAD Submitter: John Maddock Opened: 2008-01-15 Last modified: 2016-02-10
Priority: Not Prioritized
View all issues with NAD status.
Table 16 of TR1 requires that all Pseudo Random Number generators have a
member function that is equivalent to:
mygen = Generator(s)
But the generators xor_combine and discard_block have no such seed member, only the
template <class Gen> seed(Gen&);
member, which will not accept an integer literal as an argument: something that appears to violate the intent of Table 16.
So... is this a bug in TR1?
This is a real issue BTW, since the Boost implementation does adhere to the requirements of Table 16, while at least one commercial implementation does not and follows a strict adherence to sections 22.214.171.124 and 126.96.36.199 instead.
[ Jens adds: ]
Both engines do have the necessary constructor, therefore the omission of the seed() member functions appears to be an oversight.
[ Post Summit Daniel adds: ]
Recommend NAD: xor_combine does no longer exist and discard_block[_engine] has now the required seed overload accepting a result_type, which shall be an unsigned integral type.
[ Batavia (2009-05): ]
Move to NAD as recommended.