------- Comment #1 from dchichkov at gmail dot com 2010-06-24 09:53 ------- Update. Following code produces the correct value:
#include <functional> #include <random> #include <iostream> int main() { typedef std::mt19937 eng_t; typedef std::uniform_real<double> dist_t; typedef std::variate_generator <eng_t, dist_t > gen_t; eng_t eng; dist_t dist(0.0, 1.0); gen_t gen(eng, dist); std::cout << gen() << std::endl; return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44653