1 /////////////////////////////////////////////////////////////////////////////// 2 /// \file tags.hpp 3 /// Contains the tags for all the overloadable operators in C++ 4 // 5 // Copyright 2008 Eric Niebler. Distributed under the Boost 6 // Software License, Version 1.0. (See accompanying file 7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 9 #ifndef BOOST_PROTO_TAGS_HPP_EAN_04_01_2005 10 #define BOOST_PROTO_TAGS_HPP_EAN_04_01_2005 11 12 #include <boost/xpressive/proto/detail/prefix.hpp> 13 #include <boost/xpressive/proto/proto_fwd.hpp> 14 #include <boost/xpressive/proto/detail/suffix.hpp> 15 16 namespace boost { namespace proto { namespace tag 17 { 18 19 /// Tag type for terminals; aka, leaves in the expression tree. 20 struct terminal {}; 21 22 /// Tag type for the unary + operator. 23 struct posit {}; 24 25 /// Tag type for the unary - operator. 26 struct negate {}; 27 28 /// Tag type for the unary * operator. 29 struct dereference {}; 30 31 /// Tag type for the unary ~ operator. 32 struct complement {}; 33 34 /// Tag type for the unary & operator. 35 struct address_of {}; 36 37 /// Tag type for the unary ! operator. 38 struct logical_not {}; 39 40 /// Tag type for the unary prefix ++ operator. 41 struct pre_inc {}; 42 43 /// Tag type for the unary prefix -- operator. 44 struct pre_dec {}; 45 46 /// Tag type for the unary postfix ++ operator. 47 struct post_inc {}; 48 49 /// Tag type for the unary postfix -- operator. 50 struct post_dec {}; 51 52 /// Tag type for the binary \<\< operator. 53 struct shift_left {}; 54 55 /// Tag type for the binary \>\> operator. 56 struct shift_right {}; 57 58 /// Tag type for the binary * operator. 59 struct multiplies {}; 60 61 /// Tag type for the binary / operator. 62 struct divides {}; 63 64 /// Tag type for the binary % operator. 65 struct modulus {}; 66 67 /// Tag type for the binary + operator. 68 struct plus {}; 69 70 /// Tag type for the binary - operator. 71 struct minus {}; 72 73 /// Tag type for the binary \< operator. 74 struct less {}; 75 76 /// Tag type for the binary \> operator. 77 struct greater {}; 78 79 /// Tag type for the binary \<= operator. 80 struct less_equal {}; 81 82 /// Tag type for the binary \>= operator. 83 struct greater_equal {}; 84 85 /// Tag type for the binary == operator. 86 struct equal_to {}; 87 88 /// Tag type for the binary != operator. 89 struct not_equal_to {}; 90 91 /// Tag type for the binary || operator. 92 struct logical_or {}; 93 94 /// Tag type for the binary && operator. 95 struct logical_and {}; 96 97 /// Tag type for the binary & operator. 98 struct bitwise_and {}; 99 100 /// Tag type for the binary | operator. 101 struct bitwise_or {}; 102 103 /// Tag type for the binary ^ operator. 104 struct bitwise_xor {}; 105 106 /// Tag type for the binary , operator. 107 struct comma {}; 108 109 /// Tag type for the binary ->* operator. 110 struct mem_ptr {}; 111 112 /// Tag type for the binary = operator. 113 struct assign {}; 114 115 /// Tag type for the binary \<\<= operator. 116 struct shift_left_assign {}; 117 118 /// Tag type for the binary \>\>= operator. 119 struct shift_right_assign {}; 120 121 /// Tag type for the binary *= operator. 122 struct multiplies_assign {}; 123 124 /// Tag type for the binary /= operator. 125 struct divides_assign {}; 126 127 /// Tag type for the binary %= operator. 128 struct modulus_assign {}; 129 130 /// Tag type for the binary += operator. 131 struct plus_assign {}; 132 133 /// Tag type for the binary -= operator. 134 struct minus_assign {}; 135 136 /// Tag type for the binary &= operator. 137 struct bitwise_and_assign {}; 138 139 /// Tag type for the binary |= operator. 140 struct bitwise_or_assign {}; 141 142 /// Tag type for the binary ^= operator. 143 struct bitwise_xor_assign {}; 144 145 /// Tag type for the binary subscript operator. 146 struct subscript {}; 147 148 /// Tag type for the ternary ?: conditional operator. 149 struct if_else_ {}; 150 151 /// Tag type for the nary function call operator. 152 struct function {}; 153 154 }}} 155 156 #endif 157