Chris@16
|
1 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
2 /// \file null_eval.hpp
|
Chris@16
|
3 /// Contains specializations of the null_eval\<\> class template.
|
Chris@16
|
4 //
|
Chris@16
|
5 // Copyright 2008 Eric Niebler. Distributed under the Boost
|
Chris@16
|
6 // Software License, Version 1.0. (See accompanying file
|
Chris@16
|
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
8 template<typename Expr, typename Context>
|
Chris@16
|
9 struct null_eval<Expr, Context, 1>
|
Chris@16
|
10 {
|
Chris@16
|
11 typedef void result_type;
|
Chris@16
|
12 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
13 {
|
Chris@16
|
14 proto::eval(proto::child_c< 0>(expr), ctx);
|
Chris@16
|
15 }
|
Chris@16
|
16 };
|
Chris@16
|
17 template<typename Expr, typename Context>
|
Chris@16
|
18 struct null_eval<Expr, Context, 2>
|
Chris@16
|
19 {
|
Chris@16
|
20 typedef void result_type;
|
Chris@16
|
21 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
22 {
|
Chris@16
|
23 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx);
|
Chris@16
|
24 }
|
Chris@16
|
25 };
|
Chris@16
|
26 template<typename Expr, typename Context>
|
Chris@16
|
27 struct null_eval<Expr, Context, 3>
|
Chris@16
|
28 {
|
Chris@16
|
29 typedef void result_type;
|
Chris@16
|
30 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
31 {
|
Chris@16
|
32 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx);
|
Chris@16
|
33 }
|
Chris@16
|
34 };
|
Chris@16
|
35 template<typename Expr, typename Context>
|
Chris@16
|
36 struct null_eval<Expr, Context, 4>
|
Chris@16
|
37 {
|
Chris@16
|
38 typedef void result_type;
|
Chris@16
|
39 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
40 {
|
Chris@16
|
41 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx);
|
Chris@16
|
42 }
|
Chris@16
|
43 };
|
Chris@16
|
44 template<typename Expr, typename Context>
|
Chris@16
|
45 struct null_eval<Expr, Context, 5>
|
Chris@16
|
46 {
|
Chris@16
|
47 typedef void result_type;
|
Chris@16
|
48 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
49 {
|
Chris@16
|
50 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx);
|
Chris@16
|
51 }
|
Chris@16
|
52 };
|
Chris@16
|
53 template<typename Expr, typename Context>
|
Chris@16
|
54 struct null_eval<Expr, Context, 6>
|
Chris@16
|
55 {
|
Chris@16
|
56 typedef void result_type;
|
Chris@16
|
57 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
58 {
|
Chris@16
|
59 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx);
|
Chris@16
|
60 }
|
Chris@16
|
61 };
|
Chris@16
|
62 template<typename Expr, typename Context>
|
Chris@16
|
63 struct null_eval<Expr, Context, 7>
|
Chris@16
|
64 {
|
Chris@16
|
65 typedef void result_type;
|
Chris@16
|
66 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
67 {
|
Chris@16
|
68 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx);
|
Chris@16
|
69 }
|
Chris@16
|
70 };
|
Chris@16
|
71 template<typename Expr, typename Context>
|
Chris@16
|
72 struct null_eval<Expr, Context, 8>
|
Chris@16
|
73 {
|
Chris@16
|
74 typedef void result_type;
|
Chris@16
|
75 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
76 {
|
Chris@16
|
77 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx);
|
Chris@16
|
78 }
|
Chris@16
|
79 };
|
Chris@16
|
80 template<typename Expr, typename Context>
|
Chris@16
|
81 struct null_eval<Expr, Context, 9>
|
Chris@16
|
82 {
|
Chris@16
|
83 typedef void result_type;
|
Chris@16
|
84 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
85 {
|
Chris@16
|
86 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx);
|
Chris@16
|
87 }
|
Chris@16
|
88 };
|
Chris@16
|
89 template<typename Expr, typename Context>
|
Chris@16
|
90 struct null_eval<Expr, Context, 10>
|
Chris@16
|
91 {
|
Chris@16
|
92 typedef void result_type;
|
Chris@16
|
93 void operator ()(Expr &expr, Context &ctx) const
|
Chris@16
|
94 {
|
Chris@16
|
95 proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx); proto::eval(proto::child_c< 9>(expr), ctx);
|
Chris@16
|
96 }
|
Chris@16
|
97 };
|