knuth_b.pass.cpp 641 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. // <random>
  9. // typedef shuffle_order_engine<minstd_rand0, 256> knuth_b;
  10. #include <random>
  11. #include <cassert>
  12. #include "test_macros.h"
  13. int main(int, char**)
  14. {
  15. std::knuth_b e;
  16. e.discard(9999);
  17. assert(e() == 1112339016u);
  18. return 0;
  19. }