Boost.Random: Suspicious code in uniform_smallint_integer
26 Aug
2005
26 Aug
'05
7:47 a.m.
Although uniform_smallint_integer currently is no official code (its in the details section and seems nowhere used), I would like to mention, that the current implementation contains a subtle bug: The member _factor is never initialized, thus calling operator()() would cause U.B. The reason is, that the initializer member function set defines a **local** variable _factor, which is never assigned to this->_factor, such that uniform_smallint_integer::_factor will never be assigned. Just one question: Is detail::uniform_smallint_integer a leftover of some experiments by the library responsible or does it exist for interested boost users to test it? Greetings from Bremen, Daniel
7020
Age (days ago)
7020
Last active (days ago)
0 comments
1 participants
participants (1)
-
Daniel Krügler