id summary reporter owner description type status milestone component version severity resolution keywords cc 2428 [random] missing member initialization of generator_iterator ctor Johannes Brunen No-Maintainer "I am trying to use boost::generator_iterator with a random number generator as follows: --- #include #include class my_generator {...}; my_generator gen; boost::generator_iterator first(&gen); boost::generator_iterator last; boost::random::mt19937 rng; rng.seed(first, last); --- Sadly the default constructor of generator_iterator leaves m_gen uninitialized and the seed function is trying to compare first with last. This yield undefined behavior. Solution: default ctor member initialization: generator_iterator.hpp : line 38 generator_iterator() : m_g(0), m_value(0) {} " Bugs closed Boost 1.37.0 random Boost 1.36.0 Problem wontfix generator_iterator default ctor JBrunen@… dwalker07@…