|
Boost : |
Subject: [boost] [random] uniform_smallint
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2011-08-19 06:04:36
boost::uniform_smallint<> distribution defaults its min and max
constructor arguments to 0 and 9 respectively. While arbitrary, this may
make sense for default constructed distributions. However, its easy to
trigger an assert at runtime by calling its constructor with a single
value (min > 9). Could this constructor be splitted into a default
constructor and one that takes *both* min and max? I tried to check
whether the standard mandates this, but couldn't find the FDIS online
anymore (on a separate note, anyone knows where to find it?).
Agustín K-ballo Bergé.-
http://talesofcpp.blogspot.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk