PageRenderTime 163ms CodeModel.GetById 15ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 135ms

/Src/Dependencies/Boost/boost/proto/proto_typeof.hpp

http://hadesmem.googlecode.com/
C++ Header | 139 lines | 121 code | 8 blank | 10 comment | 0 complexity | d0dabd3d22054a977902868682442745 MD5 | raw file
  1///////////////////////////////////////////////////////////////////////////////
  2/// \file proto_typeof.hpp
  3/// Type registrations so that proto expression templates can be used together
  4/// with the Boost.Typeof library.
  5//
  6//  Copyright 2008 Eric Niebler. Distributed under the Boost
  7//  Software License, Version 1.0. (See accompanying file
  8//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9
 10#ifndef BOOST_XPRESSIVE_PROTO_PROTO_TYPEOF_H
 11#define BOOST_XPRESSIVE_PROTO_PROTO_TYPEOF_H
 12
 13#include <boost/config.hpp>
 14#include <boost/typeof/typeof.hpp>
 15#include <boost/proto/proto_fwd.hpp>
 16#include <boost/proto/deep_copy.hpp>
 17#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
 18
 19BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::terminal)
 20BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::unary_plus)
 21BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::negate)
 22BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::dereference)
 23BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::complement)
 24BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::address_of)
 25BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_not)
 26BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::pre_inc)
 27BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::pre_dec)
 28BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::post_inc)
 29BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::post_dec)
 30BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_left)
 31BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_right)
 32BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::multiplies)
 33BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::divides)
 34BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::modulus)
 35BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::plus)
 36BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::minus)
 37BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::less)
 38BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::greater)
 39BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::less_equal)
 40BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::greater_equal)
 41BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::equal_to)
 42BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::not_equal_to)
 43BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_or)
 44BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::logical_and)
 45BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_and)
 46BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_or)
 47BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_xor)
 48BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::comma)
 49BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::mem_ptr)
 50BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::assign)
 51BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_left_assign)
 52BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::shift_right_assign)
 53BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::multiplies_assign)
 54BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::divides_assign)
 55BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::modulus_assign)
 56BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::plus_assign)
 57BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::minus_assign)
 58BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_and_assign)
 59BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_or_assign)
 60BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::bitwise_xor_assign)
 61BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::subscript)
 62BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::member)
 63BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::if_else_)
 64BOOST_TYPEOF_REGISTER_TYPE(boost::proto::tag::function)
 65
 66BOOST_TYPEOF_REGISTER_TYPE(boost::proto::exprns_::is_proto_expr)
 67BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::exprns_::expr, (typename)(typename)(long))
 68BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::exprns_::basic_expr, (typename)(typename)(long))
 69BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::utility::literal, (typename)(typename))
 70
 71BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_generator)
 72BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_grammar)
 73BOOST_TYPEOF_REGISTER_TYPE(boost::proto::detail::not_a_domain)
 74BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::domain, 3)
 75
 76BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::term, 1)
 77BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list1, 1)
 78BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list2, 2)
 79// can't use PP metaprogramming here because all typeof registrations
 80// must be on separate lines.
 81#if BOOST_PROTO_MAX_ARITY >= 3
 82BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list3, 3)
 83#endif
 84#if BOOST_PROTO_MAX_ARITY >= 4
 85BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list4, 4)
 86#endif
 87#if BOOST_PROTO_MAX_ARITY >= 5
 88BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list5, 5)
 89#endif
 90#if BOOST_PROTO_MAX_ARITY >= 6
 91BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list6, 6)
 92#endif
 93#if BOOST_PROTO_MAX_ARITY >= 7
 94BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list7, 7)
 95#endif
 96#if BOOST_PROTO_MAX_ARITY >= 8
 97BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list8, 8)
 98#endif
 99#if BOOST_PROTO_MAX_ARITY >= 9
100BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list9, 9)
101#endif
102#if BOOST_PROTO_MAX_ARITY >= 10
103BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list10, 10)
104#endif
105#if BOOST_PROTO_MAX_ARITY >= 11
106BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list11, 11)
107#endif
108#if BOOST_PROTO_MAX_ARITY >= 12
109BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list12, 12)
110#endif
111#if BOOST_PROTO_MAX_ARITY >= 13
112BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list13, 13)
113#endif
114#if BOOST_PROTO_MAX_ARITY >= 14
115BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list14, 14)
116#endif
117#if BOOST_PROTO_MAX_ARITY >= 15
118BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list15, 15)
119#endif
120#if BOOST_PROTO_MAX_ARITY >= 16
121BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list16, 16)
122#endif
123#if BOOST_PROTO_MAX_ARITY >= 17
124BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list17, 17)
125#endif
126#if BOOST_PROTO_MAX_ARITY >= 18
127BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list18, 18)
128#endif
129#if BOOST_PROTO_MAX_ARITY >= 19
130BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list19, 19)
131#endif
132#if BOOST_PROTO_MAX_ARITY >= 20
133BOOST_TYPEOF_REGISTER_TEMPLATE(boost::proto::list20, 20)
134#endif
135
136#define BOOST_PROTO_AUTO(Var, Expr) BOOST_AUTO(Var, boost::proto::deep_copy(Expr))
137#define BOOST_PROTO_AUTO_TPL(Var, Expr) BOOST_AUTO_TPL(Var, boost::proto::deep_copy(Expr))
138
139#endif