]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2008 Dan Marsden | |
3 | ||
4 | Use modification and distribution are subject to the Boost Software | |
5 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
6 | http://www.boost.org/LICENSE_1_0.txt). | |
7 | ==============================================================================*/ | |
8 | ||
9 | #include <boost/fusion/include/vector.hpp> | |
10 | #include <boost/fusion/include/for_each.hpp> | |
11 | ||
12 | namespace fusion = boost::fusion; | |
13 | ||
14 | namespace | |
15 | { | |
16 | template<int n, int batch> | |
17 | struct distinct | |
18 | {}; | |
19 | ||
20 | struct null_op | |
21 | { | |
22 | template<typename T> | |
23 | void operator()(T const& t) const | |
24 | {} | |
25 | }; | |
26 | ||
27 | template<int batch> | |
28 | void test() | |
29 | { | |
30 | fusion::vector< | |
31 | distinct<0, batch>, distinct<1, batch>, distinct<2, batch>, distinct<3, batch>, distinct<4, batch>, | |
32 | distinct<5, batch>, distinct<6, batch>, distinct<7, batch>, distinct<8, batch>, distinct<9, batch> > v; | |
33 | ||
34 | fusion::for_each(v, null_op()); | |
35 | } | |
36 | } | |
37 | ||
38 | #include "./driver.hpp" |