proto_fwd.hpp

来自「Boost provides free peer-reviewed portab」· HPP 代码 · 共 723 行 · 第 1/2 页

HPP
723
字号
////////////////////////////////////////////////////////////////////////////////// \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 <boost/xpressive/proto/detail/prefix.hpp> // must be first include#include <cstddef>#include <climits>#include <boost/config.hpp>#include <boost/version.hpp>#include <boost/detail/workaround.hpp>#include <boost/preprocessor/arithmetic/sub.hpp>#include <boost/preprocessor/punctuation/comma.hpp>#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>#include <boost/mpl/long.hpp>#include <boost/type_traits/remove_const.hpp>#include <boost/type_traits/remove_reference.hpp>#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 <boost/utility/enable_if.hpp># include <boost/type_traits/is_const.hpp># define BOOST_PROTO_DISABLE_IF_IS_CONST(T)\    , typename boost::disable_if<boost::is_const<T>, 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<N>(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<N>(X)#endif#include <boost/xpressive/proto/detail/suffix.hpp> // 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<typename Function>        class unfused_generic {};    }}#define BOOST_PROTO_FOR_DOXYGEN_ONLY(x) x#else#define BOOST_PROTO_FOR_DOXYGEN_ONLY(x)#endifnamespace 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<typename boost::remove_reference<X>::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<template<typename> class Extends>        struct generator;        template<template<typename> class Extends>        struct pod_generator;        template<typename Generator = default_generator>        struct by_value_generator;    }    using generatorns_::default_generator;    using generatorns_::generator;    using generatorns_::pod_generator;    using generatorns_::by_value_generator;    namespace domainns_    {        template<typename Generator = default_generator, typename Grammar = proto::_>        struct domain;        struct default_domain;        struct deduce_domain;    }    using domainns_::domain;    using domainns_::default_domain;    using domainns_::deduce_domain;    namespace exprns_    {        template<typename Tag, typename Args, long Arity = Args::size>        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<typename Expr>        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<typename Grammar>        struct not_;        template<typename Condition, typename Then = _, typename Else = not_<_> >        struct if_;        template<typename Cases>        struct switch_;        template<typename T>        struct exact;        template<typename T>        struct convertible_to;        template<typename Grammar>        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<typename Expr, typename Context, long Arity = Expr::proto_arity::value>        struct null_eval;        struct default_context;        template<typename Expr, typename Context, typename Tag = typename Expr::proto_tag, long Arity = Expr::proto_arity::value>        struct default_eval;        template<typename Derived, typename DefaultCtx = default_context>        struct callable_context;        template<typename Expr, typename Context, long Arity = Expr::proto_arity::value>        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<typename T, typename Domain = default_domain>        struct literal;    }    using utility::literal;    namespace result_of    {        template<typename T, typename Domain = default_domain, typename Void = void>        struct as_expr;        template<typename T, typename Domain = default_domain, typename Void = void>        struct as_arg;        template<typename Expr, typename N = mpl::long_<0> >        struct arg;        template<typename Expr, long N>        struct arg_c;        template<typename Expr>        struct left;        template<typename Expr>        struct right;        template<typename Expr>        struct deep_copy;        template<typename T>        struct unref;        template<typename Expr, typename Context>        struct eval;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?