]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/random/include/boost/random/detail/generator_seed_seq.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / random / include / boost / random / detail / generator_seed_seq.hpp
1 /* boost random/mersenne_twister.hpp header file
2 *
3 * Copyright Jens Maurer 2000-2001
4 * Copyright Steven Watanabe 2010
5 * Distributed under the Boost Software License, Version 1.0. (See
6 * accompanying file LICENSE_1_0.txt or copy at
7 * http://www.boost.org/LICENSE_1_0.txt)
8 *
9 * See http://www.boost.org for most recent version including documentation.
10 *
11 * $Id$
12 *
13 */
14
15 #ifndef BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED
16 #define BOOST_RANDOM_DETAIL_GENERATOR_SEED_SEQ_HPP_INCLUDED
17
18 namespace boost {
19 namespace random {
20 namespace detail {
21
22 template<class Generator>
23 class generator_seed_seq {
24 public:
25 generator_seed_seq(Generator& g) : gen(&g) {}
26 template<class It>
27 void generate(It first, It last) {
28 for(; first != last; ++first) {
29 *first = (*gen)();
30 }
31 }
32 private:
33 Generator* gen;
34 };
35
36 }
37 }
38 }
39
40 #endif