http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60441
Bug ID: 60441 Summary: Incorrect textual representation for std::mersenne_twister_engine Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: koherde at hotmail dot com The textual representation of std::mersenne_twister_engine should consist of n values (n being the state size). libstdc++ uses a textual representation that consists of n+1 values. ---------------------------------- #include <iostream> #include <random> #include <sstream> int main() { std::mt19937 r; std::stringstream ss; ss << r; int valueCount = 0; std::uint32_t val; while (ss >> val) { ++valueCount; } std::cout << r.state_size << std::endl; std::cout << valueCount << std::endl; } ---------------------------------- Output: 624 625 Expected output: 624 624