blob: 4947792c333cfd7b5209beccd91207b56159dd41 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// -- operator_actions.hpp - Boost Lambda Library ----------------------
2
3// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
4//
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// For more information, see http://lambda.cs.utu.fi
10
11#ifndef BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
12#define BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
13
14namespace ndnboost {
15namespace lambda {
16
17
18// -- artihmetic ----------------------
19
20class plus_action {};
21class minus_action {};
22class multiply_action {};
23class divide_action {};
24class remainder_action {};
25
26// -- bitwise -------------------
27
28class leftshift_action {};
29class rightshift_action {};
30class xor_action {};
31
32
33// -- bitwise/logical -------------------
34
35class and_action {};
36class or_action {};
37class not_action {};
38
39// -- relational -------------------------
40
41class less_action {};
42class greater_action {};
43class lessorequal_action {};
44class greaterorequal_action {};
45class equal_action {};
46class notequal_action {};
47
48// -- increment/decrement ------------------------------
49
50class increment_action {};
51class decrement_action {};
52
53// -- void return ------------------------------
54
55// -- other ------------------------------
56
57class addressof_action {};
58 // class comma_action {}; // defined in actions.hpp
59class contentsof_action {};
60// class member_pointer_action {}; (defined in member_ptr.hpp)
61
62
63// -- actioun group templates --------------------
64
65template <class Action> class arithmetic_action;
66template <class Action> class bitwise_action;
67template <class Action> class logical_action;
68template <class Action> class relational_action;
69template <class Action> class arithmetic_assignment_action;
70template <class Action> class bitwise_assignment_action;
71template <class Action> class unary_arithmetic_action;
72template <class Action> class pre_increment_decrement_action;
73template <class Action> class post_increment_decrement_action;
74
75// ---------------------------------------------------------
76
77 // actions, for which the existence of protect is checked in return type
78 // deduction.
79
80template <class Act> struct is_protectable<arithmetic_action<Act> > {
81 BOOST_STATIC_CONSTANT(bool, value = true);
82};
83template <class Act> struct is_protectable<bitwise_action<Act> > {
84 BOOST_STATIC_CONSTANT(bool, value = true);
85};
86template <class Act> struct is_protectable<logical_action<Act> > {
87 BOOST_STATIC_CONSTANT(bool, value = true);
88};
89template <class Act> struct is_protectable<relational_action<Act> > {
90 BOOST_STATIC_CONSTANT(bool, value = true);
91};
92template <class Act>
93struct is_protectable<arithmetic_assignment_action<Act> > {
94 BOOST_STATIC_CONSTANT(bool, value = true);
95};
96template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
97 BOOST_STATIC_CONSTANT(bool, value = true);
98};
99template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
100 BOOST_STATIC_CONSTANT(bool, value = true);
101};
102template <class Act>
103struct is_protectable<pre_increment_decrement_action<Act> > {
104 BOOST_STATIC_CONSTANT(bool, value = true);
105};
106template <class Act> struct
107is_protectable<post_increment_decrement_action<Act> > {
108 BOOST_STATIC_CONSTANT(bool, value = true);
109};
110
111template <> struct is_protectable<other_action<addressof_action> > {
112 BOOST_STATIC_CONSTANT(bool, value = true);
113};
114template <> struct is_protectable<other_action<contentsof_action> > {
115 BOOST_STATIC_CONSTANT(bool, value = true);
116};
117
118template<> struct is_protectable<other_action<subscript_action> > {
119 BOOST_STATIC_CONSTANT(bool, value = true);
120};
121template<> struct is_protectable<other_action<assignment_action> > {
122 BOOST_STATIC_CONSTANT(bool, value = true);
123};
124
125// NOTE: comma action is also protectable, but the specialization is
126 // in actions.hpp
127
128
129} // namespace lambda
130} // namespace ndnboost
131
132#endif
133
134
135
136
137
138
139