2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-02-09 23:32:16 +00:00

Split inlined implementations into its own header.

This commit is contained in:
Kohei Takahashi
2016-02-20 10:56:27 +09:00
parent 302dfdc395
commit 79ff7fe634
10 changed files with 441 additions and 358 deletions

View File

@@ -84,89 +84,7 @@ namespace boost { namespace phoenix
}
};
#define BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \
assign( \
proto::_child_c<N> \
, proto::call< \
proto::_child_c<N>(proto::_state) \
> \
) \
/**/
#define BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD(Z, N, D) \
proto::and_< \
BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \
/**/
#define BOOST_PHOENIX_ACTOR_END_ASSIGN(Z, N, D) \
> \
/**/
#define BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \
proto::when< \
proto::nary_expr<proto::_ , \
BOOST_PP_ENUM_PARAMS(N, proto::_ BOOST_PP_INTERCEPT) \
> \
, BOOST_PP_ENUM( \
N \
, BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD \
, _ \
) \
BOOST_PP_REPEAT( \
N \
, BOOST_PHOENIX_ACTOR_END_ASSIGN \
, _ \
) \
> \
/**/
#define BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL(Z, N, D) \
proto::or_< \
BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \
/**/
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/assign.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/cpp03/preprocessed/assign_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010-2011 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
struct assign
: BOOST_PP_ENUM_SHIFTED(
BOOST_PHOENIX_LIMIT
, BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL
, _
)
, proto::when<
proto::terminal<proto::_>
, do_assign(proto::_, proto::_state)
>
BOOST_PP_REPEAT(
BOOST_PP_DEC(BOOST_PHOENIX_LIMIT)
, BOOST_PHOENIX_ACTOR_END_ASSIGN
, _
)
{};
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#undef BOOST_PHOENIX_ACTOR_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_ASSIGN_CHILD
#undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD
#undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CHILD
#include <boost/phoenix/core/detail/cpp03/assign.hpp>
}
// Bring in the result_of::actor<>

View File

@@ -0,0 +1,97 @@
/*=============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Eric Niebler
Copyright (c) 2010 Thomas Heller
Copyright (c) 2014 John Fletcher
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_PHOENIX_CORE_ASSIGN_HPP
#define BOOST_PHOENIX_CORE_ASSIGN_HPP
#define BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \
assign( \
proto::_child_c<N> \
, proto::call< \
proto::_child_c<N>(proto::_state) \
> \
) \
/**/
#define BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD(Z, N, D) \
proto::and_< \
BOOST_PHOENIX_ACTOR_ASSIGN_CHILD(N) \
/**/
#define BOOST_PHOENIX_ACTOR_END_ASSIGN(Z, N, D) \
> \
/**/
#define BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \
proto::when< \
proto::nary_expr<proto::_ , \
BOOST_PP_ENUM_PARAMS(N, proto::_ BOOST_PP_INTERCEPT) \
> \
, BOOST_PP_ENUM( \
N \
, BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD \
, _ \
) \
BOOST_PP_REPEAT( \
N \
, BOOST_PHOENIX_ACTOR_END_ASSIGN \
, _ \
) \
> \
/**/
#define BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL(Z, N, D) \
proto::or_< \
BOOST_PHOENIX_ACTOR_ASSIGN_CALL(N) \
/**/
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/assign.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/assign_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010-2011 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
struct assign
: BOOST_PP_ENUM_SHIFTED(
BOOST_PHOENIX_LIMIT
, BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL
, _
)
, proto::when<
proto::terminal<proto::_>
, do_assign(proto::_, proto::_state)
>
BOOST_PP_REPEAT(
BOOST_PP_DEC(BOOST_PHOENIX_LIMIT)
, BOOST_PHOENIX_ACTOR_END_ASSIGN
, _
)
{};
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#undef BOOST_PHOENIX_ACTOR_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CALL
#undef BOOST_PHOENIX_ACTOR_ASSIGN_CHILD
#undef BOOST_PHOENIX_ACTOR_START_ASSIGN_CHILD
#undef BOOST_PHOENIX_ACTOR_END_ASSIGN_CHILD
#endif

View File

@@ -0,0 +1,77 @@
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Thomas Heller
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_PHOENIX_CORE_DETAIL_FUNCTION_EQUAL_HPP
#define BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EQUAL_HPP
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_equal.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/function_equal_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*==============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2004 Daniel Wallin
Copyright (c) 2010 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define BOOST_PHOENIX_FUNCTION_EQUAL_R(Z, N, DATA) \
&& function_equal_()( \
proto::child_c< N >(e1) \
, proto::child_c< N >(e2) \
) \
/**/
#define BOOST_PHOENIX_FUNCTION_EQUAL(Z, N, DATA) \
template <typename Expr1> \
result_type \
evaluate( \
Expr1 const& e1 \
, Expr1 const& e2 \
, mpl::long_< N > \
) const \
{ \
return \
function_equal_()( \
proto::child_c<0>(e1) \
, proto::child_c<0>(e2) \
) \
BOOST_PP_REPEAT_FROM_TO( \
1 \
, N \
, BOOST_PHOENIX_FUNCTION_EQUAL_R \
, _ \
); \
} \
/**/
BOOST_PP_REPEAT_FROM_TO(
1
, BOOST_PP_INC(BOOST_PROTO_MAX_ARITY)
, BOOST_PHOENIX_FUNCTION_EQUAL
, _
)
#undef BOOST_PHOENIX_FUNCTION_EQUAL_R
#undef BOOST_PHOENIX_FUNCTION_EQUAL
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#endif

View File

@@ -0,0 +1,114 @@
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval.hpp>
#else
#if !BOOST_PHOENIX_IS_ITERATING
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1, line: 0, output: "preprocessed/function_eval_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
#define PHOENIX_GET_ARG(z, n, data) \
typedef \
typename boost::add_reference< \
typename boost::add_const< \
typename boost::result_of< \
boost::phoenix::evaluator( \
BOOST_PP_CAT(A, n) \
, Context \
) \
>::type \
>::type \
>::type \
BOOST_PP_CAT(a, n);
#define PHOENIX_EVAL_ARG(z, n, data) \
help_rvalue_deduction(boost::phoenix::eval(BOOST_PP_CAT(a, n), ctx))
#define M0(z, n, data) \
typename proto::detail::uncvref<BOOST_PP_CAT(a, n)>::type
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
<boost/phoenix/core/detail/cpp03/function_eval.hpp>))
#include BOOST_PHOENIX_ITERATE()
#undef PHOENIX_GET_ARG
#undef PHOENIX_EVAL_ARG
#undef M0
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#else
template <
typename This
, typename F
, BOOST_PHOENIX_typename_A
, typename Context
>
struct result<This(F, BOOST_PHOENIX_A, Context)>
{
typedef typename
remove_reference<
typename boost::result_of<evaluator(F, Context)>::type
>::type
fn;
BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, PHOENIX_GET_ARG, _)
typedef typename
boost::result_of<fn(BOOST_PHOENIX_a)>::type
type;
/*
typedef typename
mpl::eval_if_c<
has_phx2_result<
fn
, BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, M0, _)
>::value
, boost::result_of<
fn(
BOOST_PHOENIX_a
)
>
, phx2_result<
fn
, BOOST_PHOENIX_a
>
>::type
type;
*/
};
template <typename F, BOOST_PHOENIX_typename_A, typename Context>
typename result<
function_eval(
F const &
, BOOST_PHOENIX_A_ref
, Context const &
)
>::type
operator()(F const & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
{
return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
}
template <typename F, BOOST_PHOENIX_typename_A, typename Context>
typename result<
function_eval(
F &
, BOOST_PHOENIX_A_ref
, Context const &
)
>::type
operator()(F & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
{
return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
}
#endif
#endif

View File

@@ -0,0 +1,39 @@
/*=============================================================================
Copyright (c) 2016 Kohei Takahashi
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)
==============================================================================*/
#include <boost/preprocessor/arithmetic/dec.hpp>
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/function_eval_expr_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2016 Kohei Takahashi
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
(boost)(phoenix)(detail)(function_eval)
, (meta_grammar)
(meta_grammar)
, BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)
)
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif

View File

@@ -0,0 +1,75 @@
/*=============================================================================
Copyright (c) 2011 Thomas Heller
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)
==============================================================================*/
#if !BOOST_PHOENIX_IS_ITERATING
template <typename F, BOOST_PHOENIX_typename_A_void(BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)), typename Dummy = void>
struct has_phx2_result
: mpl::false_
{};
template <typename F, BOOST_PHOENIX_typename_A_void(BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)), typename Dummy = void>
struct phx2_result;
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "cpp03/preprocessed/phx2_result_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*=============================================================================
Copyright (c) 2011 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT), \
<boost/phoenix/core/detail/cpp03/preprocessed/phx2_result.hpp>))
#include BOOST_PHOENIX_ITERATE()
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#else
template <typename F, BOOST_PHOENIX_typename_A>
struct has_phx2_result<F, BOOST_PHOENIX_A>
: mpl::eval_if<
has_result_type<F>
, mpl::false_
, has_phx2_result_impl<typename F::template result<F(BOOST_PHOENIX_A)> >
>::type
{};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A_ref>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A_const_ref>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
#endif

View File

@@ -0,0 +1,25 @@
/*=============================================================================
Copyright (c) 2016 Kohei Takahashi
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_PHOENIX_PREPROCESSED_CORE_DETAIL_FUNCTION_EVAL_EXPR_HPP
#define BOOST_PHOENIX_PREPROCESSED_CORE_DETAIL_FUNCTION_EVAL_EXPR_HPP
#if BOOST_PHOENIX_LIMIT <= 10
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval_expr_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
#endif

View File

@@ -1,37 +1,3 @@
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#ifndef BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#define BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#include <boost/phoenix/core/limits.hpp>
#include <boost/phoenix/support/iterate.hpp>
#include <boost/phoenix/core/call.hpp>
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/meta_grammar.hpp>
#include <boost/phoenix/core/detail/phx2_result.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval.hpp>
#endif
#else
#if !BOOST_PHOENIX_IS_ITERATING
#ifndef BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#define BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#include <boost/phoenix/core/limits.hpp>
#include <boost/phoenix/support/iterate.hpp>
#include <boost/phoenix/core/call.hpp>
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/meta_grammar.hpp>
#include <boost/phoenix/core/detail/phx2_result.hpp>
#include <boost/utility/result_of.hpp>
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "cpp03/preprocessed/function_eval_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
@@ -39,17 +5,18 @@
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#define BOOST_PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#include <boost/phoenix/core/limits.hpp>
#include <boost/phoenix/support/iterate.hpp>
#include <boost/phoenix/core/call.hpp>
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/meta_grammar.hpp>
#include <boost/phoenix/core/detail/phx2_result.hpp>
#include <boost/utility/result_of.hpp>
BOOST_PHOENIX_DEFINE_EXPRESSION_VARARG(
(boost)(phoenix)(detail)(function_eval)
, (meta_grammar)
(meta_grammar)
, BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)
)
#include <boost/phoenix/core/detail/cpp03/function_eval_expr.hpp>
namespace boost { namespace phoenix {
namespace detail
@@ -97,35 +64,7 @@ namespace boost { namespace phoenix {
return boost::phoenix::eval(f, ctx)();
}
#define PHOENIX_GET_ARG(z, n, data) \
typedef \
typename boost::add_reference< \
typename boost::add_const< \
typename boost::result_of< \
boost::phoenix::evaluator( \
BOOST_PP_CAT(A, n) \
, Context \
) \
>::type \
>::type \
>::type \
BOOST_PP_CAT(a, n);
#define PHOENIX_EVAL_ARG(z, n, data) \
help_rvalue_deduction(boost::phoenix::eval(BOOST_PP_CAT(a, n), ctx))
#define M0(z, n, data) \
typename proto::detail::uncvref<BOOST_PP_CAT(a, n)>::type
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
<boost/phoenix/core/detail/function_eval.hpp>))
#include BOOST_PHOENIX_ITERATE()
#undef PHOENIX_GET_ARG
#undef PHOENIX_EVAL_ARG
#undef M0
#include <boost/phoenix/core/detail/cpp03/function_eval.hpp>
};
}
@@ -136,79 +75,4 @@ namespace boost { namespace phoenix {
{};
}}
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#else
template <
typename This
, typename F
, BOOST_PHOENIX_typename_A
, typename Context
>
struct result<This(F, BOOST_PHOENIX_A, Context)>
{
typedef typename
remove_reference<
typename boost::result_of<evaluator(F, Context)>::type
>::type
fn;
BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, PHOENIX_GET_ARG, _)
typedef typename
boost::result_of<fn(BOOST_PHOENIX_a)>::type
type;
/*
typedef typename
mpl::eval_if_c<
has_phx2_result<
fn
, BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, M0, _)
>::value
, boost::result_of<
fn(
BOOST_PHOENIX_a
)
>
, phx2_result<
fn
, BOOST_PHOENIX_a
>
>::type
type;
*/
};
template <typename F, BOOST_PHOENIX_typename_A, typename Context>
typename result<
function_eval(
F const &
, BOOST_PHOENIX_A_ref
, Context const &
)
>::type
operator()(F const & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
{
return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
}
template <typename F, BOOST_PHOENIX_typename_A, typename Context>
typename result<
function_eval(
F &
, BOOST_PHOENIX_A_ref
, Context const &
)
>::type
operator()(F & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
{
return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
}
#endif
#endif

View File

@@ -4,7 +4,6 @@
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)
==============================================================================*/
#if !BOOST_PHOENIX_IS_ITERATING
#ifndef BOOST_PHOENIX_CORE_DETAIL_PHX2_RESULT_HPP
#define BOOST_PHOENIX_CORE_DETAIL_PHX2_RESULT_HPP
#include <boost/phoenix/core/limits.hpp>
@@ -33,73 +32,9 @@ namespace boost { namespace phoenix {
typedef boost::mpl::bool_<value> type;
};
template <typename F, BOOST_PHOENIX_typename_A_void(BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)), typename Dummy = void>
struct has_phx2_result
: mpl::false_
{};
template <typename F, BOOST_PHOENIX_typename_A_void(BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT)), typename Dummy = void>
struct phx2_result;
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "cpp03/preprocessed/phx2_result_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*=============================================================================
Copyright (c) 2011 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT), \
<boost/phoenix/core/detail/phx2_result.hpp>))
#include BOOST_PHOENIX_ITERATE()
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#include <boost/phoenix/core/detail/cpp03/phx2_result.hpp>
}
}}
#endif
#else
template <typename F, BOOST_PHOENIX_typename_A>
struct has_phx2_result<F, BOOST_PHOENIX_A>
: mpl::eval_if<
has_result_type<F>
, mpl::false_
, has_phx2_result_impl<typename F::template result<F(BOOST_PHOENIX_A)> >
>::type
{};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A_ref>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
template <typename F, BOOST_PHOENIX_typename_A>
struct phx2_result<F, BOOST_PHOENIX_A_const_ref>
{
typedef typename F::template result<BOOST_PHOENIX_A>::type type;
};
#endif

View File

@@ -8,7 +8,6 @@
#ifndef BOOST_PHOENIX_CORE_FUNCTION_EQUAL_HPP
#define BOOST_PHOENIX_CORE_FUNCTION_EQUAL_HPP
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/phoenix/core/limits.hpp>
#include <boost/is_placeholder.hpp>
#include <boost/mpl/bool.hpp>
@@ -103,67 +102,7 @@ namespace boost { namespace phoenix
}
private:
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
#include <boost/phoenix/core/detail/cpp03/preprocessed/function_equal.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/cpp03/preprocessed/function_equal_" BOOST_PHOENIX_LIMIT_STR ".hpp")
#endif
/*==============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2004 Daniel Wallin
Copyright (c) 2010 Thomas Heller
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)
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define BOOST_PHOENIX_FUNCTION_EQUAL_R(Z, N, DATA) \
&& function_equal_()( \
proto::child_c< N >(e1) \
, proto::child_c< N >(e2) \
) \
/**/
#define BOOST_PHOENIX_FUNCTION_EQUAL(Z, N, DATA) \
template <typename Expr1> \
result_type \
evaluate( \
Expr1 const& e1 \
, Expr1 const& e2 \
, mpl::long_< N > \
) const \
{ \
return \
function_equal_()( \
proto::child_c<0>(e1) \
, proto::child_c<0>(e2) \
) \
BOOST_PP_REPEAT_FROM_TO( \
1 \
, N \
, BOOST_PHOENIX_FUNCTION_EQUAL_R \
, _ \
); \
} \
/**/
BOOST_PP_REPEAT_FROM_TO(
1
, BOOST_PP_INC(BOOST_PROTO_MAX_ARITY)
, BOOST_PHOENIX_FUNCTION_EQUAL
, _
)
#undef BOOST_PHOENIX_FUNCTION_EQUAL_R
#undef BOOST_PHOENIX_FUNCTION_EQUAL
#if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif
#include <boost/phoenix/core/detail/cpp03/function_equal.hpp>
};
}