Why do I get the same sequence for every run with std::random_device with mingw gcc4.8.1?

后端 未结 5 1527
野性不改
野性不改 2020-11-22 02:46

I use the following code to test the C++ library.

Why do I get the exact same sequence for every run of the compiled executable? Is

5条回答
  •  温柔的废话
    2020-11-22 03:10

    This is a GCC bug, fixed in GCC 9.2.

    If you have this problem, update your compiler. (You can get a fresh GCC from MSYS2, for example.)

提交回复
热议问题