/////////////////////////////////////////////////////////////////////////////// /// \file proto_fwd.hpp /// Forward declarations of all of proto's public types and functions. // // Copyright 2008 Eric Niebler. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PROTO_FWD_HPP_EAN_04_01_2005 #define BOOST_PROTO_FWD_HPP_EAN_04_01_2005 #include // must be first include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_PROTO_MAX_ARITY # define BOOST_PROTO_MAX_ARITY 5 #endif #ifndef BOOST_PROTO_MAX_LOGICAL_ARITY # define BOOST_PROTO_MAX_LOGICAL_ARITY 8 #endif #ifndef BOOST_PROTO_MAX_FUNCTION_CALL_ARITY # define BOOST_PROTO_MAX_FUNCTION_CALL_ARITY BOOST_PROTO_MAX_ARITY #endif #if BOOST_PROTO_MAX_FUNCTION_CALL_ARITY > BOOST_PROTO_MAX_ARITY # error BOOST_PROTO_MAX_FUNCTION_CALL_ARITY cannot be larger than BOOST_PROTO_MAX_ARITY #endif #if BOOST_WORKAROUND(__GNUC__, == 3) \ || BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(306)) # define BOOST_PROTO_BROKEN_CONST_OVERLOADS #endif #ifdef BOOST_PROTO_BROKEN_CONST_OVERLOADS # include # include # define BOOST_PROTO_DISABLE_IF_IS_CONST(T)\ , typename boost::disable_if, boost::proto::detail::undefined>::type * = 0 #else # define BOOST_PROTO_DISABLE_IF_IS_CONST(T) #endif #if BOOST_VERSION < 103500 #define BOOST_PROTO_DEFINE_FUSION_TAG(X) typedef X tag; #define BOOST_PROTO_DEFINE_FUSION_CATEGORY(X) #define BOOST_PROTO_FUSION_RESULT_OF meta #define BOOST_PROTO_FUSION_EXTENSION meta #define BOOST_PROTO_FUSION_AT_C(N, X) at(X) #else #define BOOST_PROTO_DEFINE_FUSION_TAG(X) typedef X fusion_tag; #define BOOST_PROTO_DEFINE_FUSION_CATEGORY(X) typedef X category; #define BOOST_PROTO_FUSION_RESULT_OF result_of #define BOOST_PROTO_FUSION_EXTENSION extension #define BOOST_PROTO_FUSION_AT_C(N, X) at_c(X) #endif #include // must be last include #ifdef BOOST_PROTO_DOXYGEN_INVOKED // HACKHACK so Doxygen shows inheritance from mpl::true_ and mpl::false_ namespace boost { /// INTERNAL ONLY /// namespace mpl { /// INTERNAL ONLY /// struct true_ {}; /// INTERNAL ONLY /// struct false_ {}; } /// INTERNAL ONLY /// namespace fusion { /// INTERNAL ONLY /// template class unfused_generic {}; } } #define BOOST_PROTO_FOR_DOXYGEN_ONLY(x) x #else #define BOOST_PROTO_FOR_DOXYGEN_ONLY(x) #endif namespace boost { namespace proto { namespace detail { typedef char yes_type; typedef char (&no_type)[2]; struct dont_care; struct undefined; // leave this undefined /// INTERNAL ONLY /// #define BOOST_PROTO_UNCVREF(X) \ typename boost::remove_const::type>::type } /////////////////////////////////////////////////////////////////////////////// // Operator tags namespace tag { struct terminal; struct posit; struct negate; struct dereference; struct complement; struct address_of; struct logical_not; struct pre_inc; struct pre_dec; struct post_inc; struct post_dec; struct shift_left; struct shift_right; struct multiplies; struct divides; struct modulus; struct plus; struct minus; struct less; struct greater; struct less_equal; struct greater_equal; struct equal_to; struct not_equal_to; struct logical_or; struct logical_and; struct bitwise_and; struct bitwise_or; struct bitwise_xor; struct comma; struct mem_ptr; struct assign; struct shift_left_assign; struct shift_right_assign; struct multiplies_assign; struct divides_assign; struct modulus_assign; struct plus_assign; struct minus_assign; struct bitwise_and_assign; struct bitwise_or_assign; struct bitwise_xor_assign; struct subscript; struct if_else_; struct function; // Fusion tags struct proto_expr; struct proto_expr_iterator; struct proto_flat_view; } namespace wildcardns_ { struct _; } using wildcardns_::_; namespace generatorns_ { struct default_generator; template class Extends> struct generator; template class Extends> struct pod_generator; template struct by_value_generator; } using generatorns_::default_generator; using generatorns_::generator; using generatorns_::pod_generator; using generatorns_::by_value_generator; namespace domainns_ { template struct domain; struct default_domain; struct deduce_domain; } using domainns_::domain; using domainns_::default_domain; using domainns_::deduce_domain; namespace exprns_ { template struct expr; template< typename Expr , typename Derived , typename Domain = default_domain , typename Tag = typename Expr::proto_tag > struct extends; struct is_proto_expr; } using exprns_::expr; using exprns_::extends; using exprns_::is_proto_expr; namespace refns_ { template struct ref_; } using refns_::ref_; namespace control { template< typename Grammar0 , typename Grammar1 , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2) , typename G , void ) > struct or_; template< typename Grammar0 , typename Grammar1 , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2) , typename G , void ) > struct and_; template struct not_; template > struct if_; template struct switch_; template struct exact; template struct convertible_to; template struct vararg; int const N = INT_MAX; } using control::if_; using control::or_; using control::and_; using control::not_; using control::switch_; using control::exact; using control::convertible_to; using control::vararg; using control::N; namespace context { struct null_context; template struct null_eval; struct default_context; template struct default_eval; template struct callable_context; template struct callable_eval; } using context::null_context; using context::null_eval; using context::default_context; using context::default_eval; using context::callable_context; using context::callable_eval; namespace utility { template struct literal; } using utility::literal; namespace result_of { template struct as_expr; template struct as_arg; template > struct arg; template struct arg_c; template struct left; template struct right; template struct deep_copy; template struct unref; template struct eval; template< typename Tag , typename DomainOrA0 BOOST_PP_ENUM_TRAILING_BINARY_PARAMS( BOOST_PROTO_MAX_ARITY , typename A , = void BOOST_PP_INTERCEPT ) , typename Void = void > struct make_expr; template struct unpack_expr; template struct is_ref; template struct is_expr; template struct is_domain; template struct tag_of; template struct domain_of; template struct matches; } using proto::result_of::is_ref; using proto::result_of::is_expr; using proto::result_of::is_domain; using proto::result_of::tag_of; using proto::result_of::domain_of; using proto::result_of::matches; namespace op { // Generic expression generators template struct unary_expr; template struct binary_expr; template struct nary_expr; // Specific expression generators, for convenience template struct terminal; template struct posit; template struct negate; template struct dereference; template struct complement; template struct address_of; template struct logical_not; template struct pre_inc; template struct pre_dec; template struct post_inc; template struct post_dec; template struct shift_left; template struct shift_right; template struct multiplies; template struct divides; template struct modulus; template struct plus; template struct minus; template struct less; template struct greater; template struct less_equal; template struct greater_equal; template struct equal_to; template struct not_equal_to; template struct logical_or; template struct logical_and; template struct bitwise_and; template struct bitwise_or; template struct bitwise_xor; template struct comma; template struct mem_ptr; template struct assign; template struct shift_left_assign; template struct shift_right_assign; template struct multiplies_assign; template struct divides_assign; template struct modulus_assign; template struct plus_assign; template struct minus_assign; template struct bitwise_and_assign; template struct bitwise_or_assign; template struct bitwise_xor_assign; template struct subscript; template struct if_else_; template struct function; } using namespace op; namespace functional { struct left; struct right; struct unref; struct eval; struct deep_copy; template struct as_expr; template struct as_arg; template > struct arg; template struct arg_c; template struct make_expr; template struct unpack_expr; template struct unfused_expr_fun; template struct unfused_expr; typedef make_expr make_terminal; typedef make_expr make_posit; typedef make_expr make_negate; typedef make_expr make_dereference; typedef make_expr make_complement; typedef make_expr make_address_of; typedef make_expr make_logical_not; typedef make_expr make_pre_inc; typedef make_expr make_pre_dec; typedef make_expr make_post_inc; typedef make_expr make_post_dec; typedef make_expr make_shift_left; typedef make_expr make_shift_right; typedef make_expr make_multiplies; typedef make_expr make_divides; typedef make_expr make_modulus; typedef make_expr make_plus; typedef make_expr make_minus; typedef make_expr make_less; typedef make_expr make_greater; typedef make_expr make_less_equal; typedef make_expr make_greater_equal; typedef make_expr make_equal_to; typedef make_expr make_not_equal_to; typedef make_expr make_logical_or; typedef make_expr make_logical_and; typedef make_expr make_bitwise_and; typedef make_expr make_bitwise_or; typedef make_expr make_bitwise_xor; typedef make_expr make_comma; typedef make_expr make_mem_ptr; typedef make_expr make_assign; typedef make_expr make_shift_left_assign; typedef make_expr make_shift_right_assign; typedef make_expr make_multiplies_assign; typedef make_expr make_divides_assign; typedef make_expr make_modulus_assign; typedef make_expr make_plus_assign; typedef make_expr make_minus_assign; typedef make_expr make_bitwise_and_assign; typedef make_expr make_bitwise_or_assign; typedef make_expr make_bitwise_xor_assign; typedef make_expr make_subscript; typedef make_expr make_if_else; typedef make_expr make_function; struct flatten; struct pop_front; struct reverse; } typedef functional::make_terminal _make_terminal; typedef functional::make_posit _make_posit; typedef functional::make_negate _make_negate; typedef functional::make_dereference _make_dereference; typedef functional::make_complement _make_complement; typedef functional::make_address_of _make_address_of; typedef functional::make_logical_not _make_logical_not; typedef functional::make_pre_inc _make_pre_inc; typedef functional::make_pre_dec _make_pre_dec; typedef functional::make_post_inc _make_post_inc; typedef functional::make_post_dec _make_post_dec; typedef functional::make_shift_left _make_shift_left; typedef functional::make_shift_right _make_shift_right; typedef functional::make_multiplies _make_multiplies; typedef functional::make_divides _make_divides; typedef functional::make_modulus _make_modulus; typedef functional::make_plus _make_plus; typedef functional::make_minus _make_minus; typedef functional::make_less _make_less; typedef functional::make_greater _make_greater; typedef functional::make_less_equal _make_less_equal; typedef functional::make_greater_equal _make_greater_equal; typedef functional::make_equal_to _make_equal_to; typedef functional::make_not_equal_to _make_not_equal_to; typedef functional::make_logical_or _make_logical_or; typedef functional::make_logical_and _make_logical_and; typedef functional::make_bitwise_and _make_bitwise_and; typedef functional::make_bitwise_or _make_bitwise_or; typedef functional::make_bitwise_xor _make_bitwise_xor; typedef functional::make_comma _make_comma; typedef functional::make_mem_ptr _make_mem_ptr; typedef functional::make_assign _make_assign; typedef functional::make_shift_left_assign _make_shift_left_assign; typedef functional::make_shift_right_assign _make_shift_right_assign; typedef functional::make_multiplies_assign _make_multiplies_assign; typedef functional::make_divides_assign _make_divides_assign; typedef functional::make_modulus_assign _make_modulus_assign; typedef functional::make_plus_assign _make_plus_assign; typedef functional::make_minus_assign _make_minus_assign; typedef functional::make_bitwise_and_assign _make_bitwise_and_assign; typedef functional::make_bitwise_or_assign _make_bitwise_or_assign; typedef functional::make_bitwise_xor_assign _make_bitwise_xor_assign; typedef functional::make_subscript _make_subscript; typedef functional::make_if_else _make_if_else; typedef functional::make_function _make_function; typedef functional::flatten _flatten; typedef functional::pop_front _pop_front; typedef functional::reverse _reverse; typedef functional::deep_copy _eval; typedef functional::deep_copy _deep_copy; template struct is_callable; template struct is_aggregate; namespace transform { #define BOOST_PROTO_CALLABLE() typedef void proto_is_callable_; struct callable { BOOST_PROTO_CALLABLE() }; template struct when; template struct otherwise; template struct call; template struct make; template struct bind; template struct fold; template struct reverse_fold; // BUGBUG can we replace fold_tree with fold ? template struct fold_tree; template struct reverse_fold_tree; template struct pass_through; struct expr; struct state; struct visitor; template struct arg_c; typedef arg_c<0> arg0; typedef arg_c<1> arg1; typedef arg_c<2> arg2; typedef arg_c<3> arg3; typedef arg_c<4> arg4; typedef arg_c<5> arg5; typedef arg_c<6> arg6; typedef arg_c<7> arg7; typedef arg_c<8> arg8; typedef arg_c<9> arg9; typedef arg0 arg; typedef arg0 left; typedef arg1 right; struct _ref; } using transform::when; using transform::call; using transform::make; using transform::bind; using transform::fold; using transform::otherwise; using transform::reverse_fold; using transform::fold_tree; using transform::reverse_fold_tree; using transform::callable; using transform::pass_through; typedef transform::expr _expr; typedef transform::state _state; typedef transform::visitor _visitor; typedef transform::arg0 _arg0; typedef transform::arg1 _arg1; typedef transform::arg2 _arg2; typedef transform::arg3 _arg3; typedef transform::arg4 _arg4; typedef transform::arg5 _arg5; typedef transform::arg6 _arg6; typedef transform::arg7 _arg7; typedef transform::arg8 _arg8; typedef transform::arg9 _arg9; typedef transform::arg _arg; typedef transform::left _left; typedef transform::right _right; template struct _arg_c; using transform::_ref; template struct is_extension; namespace exops {} typedef void ignore_(); inline void ignore() {} }} // namespace boost::proto #endif