[PATCH] D41316: [libcxx] Allow random_device to be built optionally

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 9 18:17:08 PST 2018


EricWF added inline comments.


================
Comment at: test/std/experimental/filesystem/lit.local.cfg:5
+
+# filesystem_test_helper uses random_device to generate random path.
+if 'libcpp-has-no-random-device' in config.available_features:
----------------
EricWF wrote:
> I would rather keep these tests running using a different source for the random seed if possible.
Perhaps the random generator could be initialized using `std::chrono::system_clock::now().time_since_epoch().count()`, which should produce more distinct values that the typical `time(NULL)` method used to initialize `srand`.


Repository:
  rCXX libc++

https://reviews.llvm.org/D41316





More information about the cfe-commits mailing list