Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:34

0001 ///////////////////////////////////////////////////////////////////////////////
0002 /// \file proto_typeof.hpp
0003 /// Type registrations so that proto expression templates can be used together
0004 /// with the Boost.Typeof library.
0005 //
0006 //  Copyright 2008 Eric Niebler. Distributed under the Boost
0007 //  Software License, Version 1.0. (See accompanying file
0008 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 #ifndef BOOST_XPRESSIVE_PROTO_PROTO_TYPEOF_H
0011 #define BOOST_XPRESSIVE_PROTO_PROTO_TYPEOF_H
0012 
0013 #include <boost/config.hpp>
0014 #include <boost/typeof/typeof.hpp>
0015 #include <boost/proto/proto_fwd.hpp>
0016 #include <boost/proto/deep_copy.hpp>
0017 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
0018 
0019 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::terminal)
0020 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::unary_plus)
0021 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::negate)
0022 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::dereference)
0023 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::complement)
0024 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::address_of)
0025 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_not)
0026 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::pre_inc)
0027 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::pre_dec)
0028 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::post_inc)
0029 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::post_dec)
0030 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_left)
0031 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_right)
0032 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::multiplies)
0033 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::divides)
0034 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::modulus)
0035 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::plus)
0036 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::minus)
0037 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::less)
0038 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::greater)
0039 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::less_equal)
0040 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::greater_equal)
0041 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::equal_to)
0042 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::not_equal_to)
0043 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_or)
0044 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_and)
0045 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_and)
0046 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_or)
0047 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_xor)
0048 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::comma)
0049 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::mem_ptr)
0050 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::assign)
0051 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_left_assign)
0052 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_right_assign)
0053 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::multiplies_assign)
0054 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::divides_assign)
0055 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::modulus_assign)
0056 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::plus_assign)
0057 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::minus_assign)
0058 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_and_assign)
0059 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_or_assign)
0060 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_xor_assign)
0061 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::subscript)
0062 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::member)
0063 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::if_else_)
0064 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::function)
0065 
0066 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::exprns_::is_proto_expr)
0067 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::exprns_::expr, (typename)(typename)(long))
0068 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::exprns_::basic_expr, (typename)(typename)(long))
0069 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::utility::literal, (typename)(typename))
0070 
0071 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_generator)
0072 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_grammar)
0073 BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_domain)
0074 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::domain, 3)
0075 
0076 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::term, 1)
0077 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list1, 1)
0078 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list2, 2)
0079 // can't use PP metaprogramming here because all typeof registrations
0080 // must be on separate lines.
0081 #if BOOST_PROTO_MAX_ARITY >= 3
0082 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list3, 3)
0083 #endif
0084 #if BOOST_PROTO_MAX_ARITY >= 4
0085 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list4, 4)
0086 #endif
0087 #if BOOST_PROTO_MAX_ARITY >= 5
0088 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list5, 5)
0089 #endif
0090 #if BOOST_PROTO_MAX_ARITY >= 6
0091 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list6, 6)
0092 #endif
0093 #if BOOST_PROTO_MAX_ARITY >= 7
0094 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list7, 7)
0095 #endif
0096 #if BOOST_PROTO_MAX_ARITY >= 8
0097 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list8, 8)
0098 #endif
0099 #if BOOST_PROTO_MAX_ARITY >= 9
0100 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list9, 9)
0101 #endif
0102 #if BOOST_PROTO_MAX_ARITY >= 10
0103 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list10, 10)
0104 #endif
0105 #if BOOST_PROTO_MAX_ARITY >= 11
0106 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list11, 11)
0107 #endif
0108 #if BOOST_PROTO_MAX_ARITY >= 12
0109 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list12, 12)
0110 #endif
0111 #if BOOST_PROTO_MAX_ARITY >= 13
0112 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list13, 13)
0113 #endif
0114 #if BOOST_PROTO_MAX_ARITY >= 14
0115 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list14, 14)
0116 #endif
0117 #if BOOST_PROTO_MAX_ARITY >= 15
0118 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list15, 15)
0119 #endif
0120 #if BOOST_PROTO_MAX_ARITY >= 16
0121 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list16, 16)
0122 #endif
0123 #if BOOST_PROTO_MAX_ARITY >= 17
0124 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list17, 17)
0125 #endif
0126 #if BOOST_PROTO_MAX_ARITY >= 18
0127 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list18, 18)
0128 #endif
0129 #if BOOST_PROTO_MAX_ARITY >= 19
0130 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list19, 19)
0131 #endif
0132 #if BOOST_PROTO_MAX_ARITY >= 20
0133 BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list20, 20)
0134 #endif
0135 
0136 #define BOOST_PROTO_AUTO(Var, Expr) BOOST_AUTO(Var, boost::proto::deep_copy(Expr))
0137 #define BOOST_PROTO_AUTO_TPL(Var, Expr) BOOST_AUTO_TPL(Var, boost::proto::deep_copy(Expr))
0138 
0139 #endif