id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10921,Seeding boost::random::mt19937 from a pair of iterators throws an exception,Adam Romanek ,No-Maintainer,"The problem is that when seeding `boost::random::mt19937` from a pair of iterators `std::invalid_argument(""Not enough elements in call to seed"")` exception is thrown. An isolated test case looks like this: {{{ #include #include //typedef boost::random::rand48 generator_t; typedef boost::random::mt19937 generator_t; int main() { typedef boost::array seed_range_t; seed_range_t seed = {1, 2, 3}; boost::random::seed_seq seed2(seed.begin(), seed.end()); generator_t generator1(seed2); // works fine seed_range_t::iterator begin = seed.begin(); generator_t generator2(begin, seed.end()); // throws std::invalid_argument(""Not enough elements in call to seed"") } }}} The documentation of the relevant constructor ![1] does not help too much. Please note that using the same input sequence through `boost::random::seed_seq` works fine. Moreover, the same input sequence passed directly to the constructor of `boost::random::rand48` generator also produces no exceptions. I'm not sure if `mersenne_twister_engine` needs larger input or the implementation is broken. Please advice. ![1] http://www.boost.org/doc/libs/1_57_0/doc/html/boost/random/mersenne_twister_engine.html#idp93974544-bb",Bugs,new,To Be Determined,random,Boost 1.57.0,Problem,,,