1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template<class Engine, size_t p, size_t r>
13 // class discard_block_engine
17 // typedef typename Engine::result_type result_type;
19 // // engine characteristics
20 // static constexpr size_t block_size = p;
21 // static constexpr size_t used_block = r;
22 // static constexpr result_type min() { return Engine::min(); }
23 // static constexpr result_type max() { return Engine::max(); }
26 #include <type_traits>
30 void where(const _Tp &) {}
35 typedef std::ranlux24 E;
36 static_assert((E::block_size == 223), "");
37 static_assert((E::used_block == 23), "");
38 #if TEST_STD_VER >= 11
39 static_assert((E::min() == 0), "");
40 static_assert((E::max() == 0xFFFFFF), "");
42 assert((E::min() == 0));
43 assert((E::max() == 0xFFFFFF));
52 typedef std::ranlux48 E;
53 static_assert((E::block_size == 389), "");
54 static_assert((E::used_block == 11), "");
55 #if TEST_STD_VER >= 11
56 static_assert((E::min() == 0), "");
57 static_assert((E::max() == 0xFFFFFFFFFFFFull), "");
59 assert((E::min() == 0));
60 assert((E::max() == 0xFFFFFFFFFFFFull));