The uniform_int distribution in the following program (copied from start of the Boost random documentation) returns a value (-1) that is outside of its range.
Thanks, Mark Johnson #include <iostream> #include <tr1/random> int main() { std::tr1::mt19937 rng; std::tr1::uniform_int<> six(1,6); std::tr1::variate_generator<std::tr1::mt19937, std::tr1::uniform_int<> > die(rng, six); std::cout << "die() = " << die() << std::endl; } // [EMAIL PROTECTED] tmp]$ a.out // die() = -1 -- Summary: std::tr1::uniform_int returns value out of range Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mj1 at cog dot brown dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33128