summaryrefslogtreecommitdiff
path: root/boost/phoenix/bind
diff options
context:
space:
mode:
Diffstat (limited to 'boost/phoenix/bind')
-rw-r--r--boost/phoenix/bind/bind_function.hpp148
-rw-r--r--boost/phoenix/bind/bind_function_object.hpp75
-rw-r--r--boost/phoenix/bind/bind_member_function.hpp287
-rw-r--r--boost/phoenix/bind/detail/cpp03/bind_function.hpp113
-rw-r--r--boost/phoenix/bind/detail/cpp03/bind_function_object.hpp74
-rw-r--r--boost/phoenix/bind/detail/cpp03/bind_member_function.hpp251
-rw-r--r--boost/phoenix/bind/detail/cpp03/function_ptr.hpp (renamed from boost/phoenix/bind/detail/function_ptr.hpp)9
-rw-r--r--boost/phoenix/bind/detail/cpp03/member_function_ptr.hpp (renamed from boost/phoenix/bind/detail/member_function_ptr.hpp)9
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function.hpp)10
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_10.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_10.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_20.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_20.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_30.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_30.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_40.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_40.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_50.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_50.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object.hpp)10
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_10.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object_10.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_20.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object_20.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_30.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object_30.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_40.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object_40.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_50.hpp (renamed from boost/phoenix/bind/preprocessed/bind_function_object_50.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function.hpp)10
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_10.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function_10.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_20.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function_20.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_30.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function_30.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_40.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function_40.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_50.hpp (renamed from boost/phoenix/bind/preprocessed/bind_member_function_50.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr.hpp)10
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_10.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr_10.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_20.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr_20.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_30.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr_30.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_40.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr_40.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_50.hpp (renamed from boost/phoenix/bind/detail/preprocessed/function_ptr_50.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr.hpp)10
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_10.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr_10.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_20.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr_20.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_30.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr_30.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_40.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr_40.hpp)0
-rw-r--r--boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_50.hpp (renamed from boost/phoenix/bind/detail/preprocessed/member_function_ptr_50.hpp)0
38 files changed, 606 insertions, 410 deletions
diff --git a/boost/phoenix/bind/bind_function.hpp b/boost/phoenix/bind/bind_function.hpp
index ea1e2d76c0..fdb2fc543d 100644
--- a/boost/phoenix/bind/bind_function.hpp
+++ b/boost/phoenix/bind/bind_function.hpp
@@ -1,118 +1,66 @@
/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2016 Kohei Takahashi
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ 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 PHOENIX_BIND_BIND_FUNCTION_HPP
#define PHOENIX_BIND_BIND_FUNCTION_HPP
+#include <boost/phoenix/core/limits.hpp>
+
+#if defined(BOOST_PHOENIX_NO_VARIADIC_BIND)
+# include <boost/phoenix/bind/detail/cpp03/bind_function.hpp>
+#else
+
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/detail/function_eval.hpp>
-#include <boost/phoenix/bind/detail/function_ptr.hpp>
-namespace boost { namespace phoenix {
-
- template <
- typename RT
- >
- inline
- typename detail::expression::function_eval<
- detail::function_ptr<0, RT, RT(*)()>
- >::type const
- bind(RT(*f)())
+namespace boost { namespace phoenix
+{
+ namespace detail
{
- typedef detail::function_ptr<0, RT, RT(*)()> fp_type;
- return detail::expression::function_eval<fp_type>::make(fp_type(f));
- }
-
- template <
- typename RT
- , typename T0
- , typename A0
- >
- inline
- typename detail::expression::function_eval<
- detail::function_ptr<1, RT, RT(*)(T0)>
- , A0
+ template <typename RT, typename FP>
+ struct function_ptr
+ {
+ typedef RT result_type;
+
+ function_ptr(FP fp_)
+ : fp(fp_) {}
+
+ template <typename... A>
+ result_type operator()(A&... a) const
+ {
+ return fp(a...);
+ }
+
+ bool operator==(function_ptr const& rhs) const
+ {
+ return fp == rhs.fp;
+ }
+
+ template <typename RhsRT, typename RhsFP>
+ bool operator==(function_ptr<RhsRT, RhsFP> const& /*rhs*/) const
+ {
+ return false;
+ }
+
+ FP fp;
+ };
+ } // namespace boost::phoenix::detail
+
+ template <typename RT, typename... T, typename... A>
+ inline typename detail::expression::function_eval<
+ detail::function_ptr<RT, RT (*)(T...)>
+ , A...
>::type const
- bind(RT(*f)(T0), A0 const & a0)
+ bind(RT (*f)(T...), A const&... a)
{
- typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type;
- return detail::expression::function_eval<fp_type, A0>::make(fp_type(f), a0);
+ typedef detail::function_ptr<RT, RT (*)(T...)> fp_type;
+ return detail::expression::function_eval<fp_type, A...>::make(fp_type(f), a...);
}
-
-#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
- #include <boost/phoenix/bind/preprocessed/bind_function.hpp>
-#else
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_" BOOST_PHOENIX_LIMIT_STR ".hpp")
-#endif
-
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- 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, (2, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
- <boost/phoenix/bind/bind_function.hpp>))
-#include BOOST_PHOENIX_ITERATE()
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(output: null)
-#endif
-
-#endif
-
-}}
+}} // namespace boost::phoenix
#endif
-
-#else
-
- template <
- typename RT
- , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
- , BOOST_PHOENIX_typename_A
- >
- inline
- typename detail::expression::function_eval<
- detail::function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- >
- , BOOST_PHOENIX_A
- >::type const
- bind(
- RT(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- , BOOST_PHOENIX_A_const_ref_a
- )
- {
- typedef detail::function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- > fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , BOOST_PHOENIX_A
- >::make(
- fp_type(f)
- , BOOST_PHOENIX_a
- );
- }
-
#endif
diff --git a/boost/phoenix/bind/bind_function_object.hpp b/boost/phoenix/bind/bind_function_object.hpp
index 00bdb9b245..ed2be3eace 100644
--- a/boost/phoenix/bind/bind_function_object.hpp
+++ b/boost/phoenix/bind/bind_function_object.hpp
@@ -1,79 +1,38 @@
/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2016 Kohei Takahashi
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ 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 PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
#define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP
+#include <boost/phoenix/core/limits.hpp>
+
+#if defined(BOOST_PHOENIX_NO_VARIADIC_BIND)
+# include <boost/phoenix/bind/detail/cpp03/bind_function_object.hpp>
+#else
+
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/detail/function_eval.hpp>
-namespace boost { namespace phoenix {
+namespace boost { namespace phoenix
+{
template <typename F>
- inline
- typename detail::expression::function_eval<F>::type const
+ inline typename detail::expression::function_eval<F>::type const
bind(F f)
{
return detail::expression::function_eval<F>::make(f);
}
-#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
- #include <boost/phoenix/bind/preprocessed/bind_function_object.hpp>
-#else
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_object_" BOOST_PHOENIX_LIMIT_STR ".hpp")
-#endif
-
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- 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_ACTOR_LIMIT), \
- <boost/phoenix/bind/bind_function_object.hpp>))
-#include BOOST_PHOENIX_ITERATE()
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(output: null)
-#endif
-
-#endif
-
-}}
-
-#endif
-
-#else
-
- template <
- typename F
- , BOOST_PHOENIX_typename_A
- >
- inline
- typename detail::expression::function_eval<
- F
- , BOOST_PHOENIX_A
- >::type const
- bind(F f, BOOST_PHOENIX_A_const_ref_a)
+ template <typename F, typename... A>
+ inline typename detail::expression::function_eval<F, A...>::type const
+ bind(F f, A const&... a)
{
- return
- detail::expression::function_eval<F, BOOST_PHOENIX_A>::make(
- f
- , BOOST_PHOENIX_a
- );
+ return detail::expression::function_eval<F, A...>::make(f, a...);
}
+}} // namespace boost::phoenix
#endif
+#endif
diff --git a/boost/phoenix/bind/bind_member_function.hpp b/boost/phoenix/bind/bind_member_function.hpp
index 498f1a0018..c3bbcda66d 100644
--- a/boost/phoenix/bind/bind_member_function.hpp
+++ b/boost/phoenix/bind/bind_member_function.hpp
@@ -1,256 +1,117 @@
/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
- Copyright (c) 2014 John Fletcher
+ 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 !BOOST_PHOENIX_IS_ITERATING
-
#ifndef PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP
#define PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/phoenix/core/limits.hpp>
+
+#if defined(BOOST_PHOENIX_NO_VARIADIC_BIND)
+# include <boost/phoenix/bind/detail/cpp03/bind_member_function.hpp>
+#else
+
#include <boost/phoenix/core/expression.hpp>
#include <boost/phoenix/core/reference.hpp>
#include <boost/phoenix/core/detail/function_eval.hpp>
-#include <boost/phoenix/bind/detail/member_function_ptr.hpp>
namespace boost { namespace phoenix
{
-
- template <typename RT, typename ClassT, typename ClassA>
- inline
- typename boost::lazy_enable_if<
- boost::is_member_function_pointer<RT (ClassT::*)()>,
- typename detail::expression::function_eval<
- detail::member_function_ptr<0, RT, RT(ClassT::*)()>
- , ClassA >
- >::type const
- bind(RT(ClassT::*f)(), ClassA const& obj)
- {
- typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type;
- return
- detail::expression::function_eval<fp_type, ClassA>::make(
- fp_type(f)
- , obj
- );
- }
-
- template <typename RT, typename ClassT, typename ClassA>
- inline
- typename boost::lazy_enable_if<
- boost::is_member_function_pointer<RT (ClassT::*)()>,
- typename detail::expression::function_eval<
- detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
- , ClassA >
- >::type const
- bind(RT(ClassT::*f)() const, ClassA const& obj)
- {
- typedef
- detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
- fp_type;
- return
- detail::expression::function_eval<fp_type, ClassA>::make(
- fp_type(f)
- , obj
- );
- }
-
- template <typename RT, typename ClassT>
- inline
- typename detail::expression::function_eval<
- detail::member_function_ptr<0, RT, RT(ClassT::*)()>
- , ClassT
- >::type const
- bind(RT(ClassT::*f)(), ClassT& obj)
+ namespace detail
{
- typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , ClassT
- >::make(
- fp_type(f)
- , obj
- );
- }
-
- template <typename RT, typename ClassT>
+ template <typename RT, typename FP>
+ struct member_function_ptr
+ {
+ typedef RT result_type;
+
+ member_function_ptr(FP fp_)
+ : fp(fp_) {}
+
+ template <typename Class, typename... A>
+ result_type operator()(Class& obj, A&... a) const
+ {
+ BOOST_PROTO_USE_GET_POINTER();
+
+ typedef typename proto::detail::class_member_traits<FP>::class_type class_type;
+ return (BOOST_PROTO_GET_POINTER(class_type, obj)->*fp)(a...);
+ }
+
+ template <typename Class, typename... A>
+ result_type operator()(Class* obj, A&... a) const
+ {
+ return (obj->*fp)(a...);
+ }
+
+ bool operator==(member_function_ptr const& rhs) const
+ {
+ return fp == rhs.fp;
+ }
+
+ template <int M, typename RhsRT, typename RhsFP>
+ bool operator==(member_function_ptr<RhsRT, RhsFP> const& /*rhs*/) const
+ {
+ return false;
+ }
+
+ FP fp;
+ };
+ } // namespace boost::phoenix::detail
+
+ template <typename RT, typename ClassT, typename... T, typename ClassA, typename... A>
inline
typename detail::expression::function_eval<
- detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
- , ClassT
+ detail::member_function_ptr<RT, RT(ClassT::*)(T...)>
+ , ClassA
+ , A...
>::type const
- bind(RT(ClassT::*f)() const, ClassT& obj)
+ bind(RT (ClassT::*f)(T...), ClassA const & obj, A const&... a)
{
- typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , ClassT
- >::make(
- fp_type(f)
- , obj
- );
+ typedef detail::member_function_ptr<RT, RT (ClassT::*)(T...)> fp_type;
+ return detail::expression::function_eval<fp_type, ClassA, A...>::make(fp_type(f), obj, a...);
}
-#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
- #include <boost/phoenix/bind/preprocessed/bind_member_function.hpp>
-#else
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_member_function_" BOOST_PHOENIX_LIMIT_STR ".hpp")
-#endif
-
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- 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_ACTOR_LIMIT), \
- <boost/phoenix/bind/bind_member_function.hpp>))
-#include BOOST_PHOENIX_ITERATE()
-
-#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
- #pragma wave option(output: null)
-#endif
-
-#endif
-
-}}
-
-#endif
-
-#else
-
- template <
- typename RT
- , typename ClassT
- , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
- , typename ClassA
- , BOOST_PHOENIX_typename_A
- >
+ template <typename RT, typename ClassT, typename... T, typename ClassA, typename... A>
inline
typename detail::expression::function_eval<
- detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- >
+ detail::member_function_ptr<RT, RT (ClassT::*)(T...) const>
, ClassA
- , BOOST_PHOENIX_A
+ , A...
>::type const
- bind(
- RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- , ClassA const & obj
- , BOOST_PHOENIX_A_const_ref_a
- )
+ bind(RT (ClassT::*f)(T...) const, ClassA const & obj, A const&... a)
{
- typedef detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- > fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , ClassA
- , BOOST_PHOENIX_A
- >::make(
- fp_type(f)
- , obj
- , BOOST_PHOENIX_a
- );
+ typedef detail::member_function_ptr<RT, RT(ClassT::*)(T...) const> fp_type;
+ return detail::expression::function_eval<fp_type, ClassA, A...>::make(fp_type(f), obj, a...);
}
- template <
- typename RT
- , typename ClassT
- , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
- , typename ClassA
- , BOOST_PHOENIX_typename_A
- >
+ template <typename RT, typename ClassT, typename... T, typename... A>
inline
typename detail::expression::function_eval<
- detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
- >
- , ClassA
- , BOOST_PHOENIX_A
+ detail::member_function_ptr<RT, RT(ClassT::*)(T...)>
+ , ClassT
+ , A...
>::type const
- bind(
- RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
- , ClassA const & obj
- , BOOST_PHOENIX_A_const_ref_a
- )
+ bind(RT (ClassT::*f)(T...), ClassT & obj, A const&... a)
{
- typedef detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
- > fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , ClassA
- , BOOST_PHOENIX_A
- >::make(
- fp_type(f)
- , obj
- , BOOST_PHOENIX_a
- );
+ typedef detail::member_function_ptr<RT, RT(ClassT::*)(T...)> fp_type;
+ return detail::expression::function_eval<fp_type, ClassT, A...>::make(fp_type(f), obj, a...);
}
- template <
- typename RT
- , typename ClassT
- , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
- , BOOST_PHOENIX_typename_A
- >
+ template <typename RT, typename ClassT, typename... T, typename... A>
inline
typename detail::expression::function_eval<
- detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- >
+ detail::member_function_ptr<RT, RT(ClassT::*)(T...) const>
, ClassT
- , BOOST_PHOENIX_A
+ , A...
>::type const
- bind(
- RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- , ClassT & obj
- , BOOST_PHOENIX_A_const_ref_a
- )
+ bind(RT (ClassT::*f)(T...) const, ClassT const& obj, A const&... a)
{
- typedef detail::member_function_ptr<
- BOOST_PHOENIX_ITERATION
- , RT
- , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
- > fp_type;
- return
- detail::expression::function_eval<
- fp_type
- , ClassT
- , BOOST_PHOENIX_A
- >::make(
- fp_type(f)
- , obj
- , BOOST_PHOENIX_a
- );
+ typedef detail::member_function_ptr<RT, RT(ClassT::*)(T...) const> fp_type;
+ return detail::expression::function_eval<fp_type, ClassT, A...>::make(fp_type(f), obj, a...);
}
+}} // namespace boost::phoenix
#endif
-
+#endif
diff --git a/boost/phoenix/bind/detail/cpp03/bind_function.hpp b/boost/phoenix/bind/detail/cpp03/bind_function.hpp
new file mode 100644
index 0000000000..d3ff89c8bf
--- /dev/null
+++ b/boost/phoenix/bind/detail/cpp03/bind_function.hpp
@@ -0,0 +1,113 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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
+
+#include <boost/phoenix/core/expression.hpp>
+#include <boost/phoenix/core/detail/function_eval.hpp>
+#include <boost/phoenix/bind/detail/cpp03/function_ptr.hpp>
+
+namespace boost { namespace phoenix {
+
+ template <
+ typename RT
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::function_ptr<0, RT, RT(*)()>
+ >::type const
+ bind(RT(*f)())
+ {
+ typedef detail::function_ptr<0, RT, RT(*)()> fp_type;
+ return detail::expression::function_eval<fp_type>::make(fp_type(f));
+ }
+
+ template <
+ typename RT
+ , typename T0
+ , typename A0
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::function_ptr<1, RT, RT(*)(T0)>
+ , A0
+ >::type const
+ bind(RT(*f)(T0), A0 const & a0)
+ {
+ typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type;
+ return detail::expression::function_eval<fp_type, A0>::make(fp_type(f), a0);
+ }
+
+#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
+ #include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function.hpp>
+#else
+
+#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_" BOOST_PHOENIX_LIMIT_STR ".hpp")
+#endif
+
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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, (2, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
+ <boost/phoenix/bind/detail/cpp03/bind_function.hpp>))
+#include BOOST_PHOENIX_ITERATE()
+
+#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(output: null)
+#endif
+
+#endif
+
+}}
+
+#else
+
+ template <
+ typename RT
+ , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
+ , BOOST_PHOENIX_typename_A
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ >
+ , BOOST_PHOENIX_A
+ >::type const
+ bind(
+ RT(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ , BOOST_PHOENIX_A_const_ref_a
+ )
+ {
+ typedef detail::function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ > fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , BOOST_PHOENIX_A
+ >::make(
+ fp_type(f)
+ , BOOST_PHOENIX_a
+ );
+ }
+
+#endif
diff --git a/boost/phoenix/bind/detail/cpp03/bind_function_object.hpp b/boost/phoenix/bind/detail/cpp03/bind_function_object.hpp
new file mode 100644
index 0000000000..a0aa386163
--- /dev/null
+++ b/boost/phoenix/bind/detail/cpp03/bind_function_object.hpp
@@ -0,0 +1,74 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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
+
+#include <boost/phoenix/core/expression.hpp>
+#include <boost/phoenix/core/detail/function_eval.hpp>
+
+namespace boost { namespace phoenix {
+ template <typename F>
+ inline
+ typename detail::expression::function_eval<F>::type const
+ bind(F f)
+ {
+ return detail::expression::function_eval<F>::make(f);
+ }
+
+#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
+ #include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object.hpp>
+#else
+
+#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_object_" BOOST_PHOENIX_LIMIT_STR ".hpp")
+#endif
+
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_ACTOR_LIMIT), \
+ <boost/phoenix/bind/detail/cpp03/bind_function_object.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
+ >
+ inline
+ typename detail::expression::function_eval<
+ F
+ , BOOST_PHOENIX_A
+ >::type const
+ bind(F f, BOOST_PHOENIX_A_const_ref_a)
+ {
+ return
+ detail::expression::function_eval<F, BOOST_PHOENIX_A>::make(
+ f
+ , BOOST_PHOENIX_a
+ );
+ }
+
+#endif
diff --git a/boost/phoenix/bind/detail/cpp03/bind_member_function.hpp b/boost/phoenix/bind/detail/cpp03/bind_member_function.hpp
new file mode 100644
index 0000000000..c4801265db
--- /dev/null
+++ b/boost/phoenix/bind/detail/cpp03/bind_member_function.hpp
@@ -0,0 +1,251 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ 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)
+==============================================================================*/
+
+#if !BOOST_PHOENIX_IS_ITERATING
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/phoenix/core/expression.hpp>
+#include <boost/phoenix/core/reference.hpp>
+#include <boost/phoenix/core/detail/function_eval.hpp>
+#include <boost/phoenix/bind/detail/cpp03/member_function_ptr.hpp>
+
+namespace boost { namespace phoenix
+{
+
+ template <typename RT, typename ClassT, typename ClassA>
+ inline
+ typename boost::lazy_enable_if<
+ boost::is_member_function_pointer<RT (ClassT::*)()>,
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<0, RT, RT(ClassT::*)()>
+ , ClassA >
+ >::type const
+ bind(RT(ClassT::*f)(), ClassA const& obj)
+ {
+ typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type;
+ return
+ detail::expression::function_eval<fp_type, ClassA>::make(
+ fp_type(f)
+ , obj
+ );
+ }
+
+ template <typename RT, typename ClassT, typename ClassA>
+ inline
+ typename boost::lazy_enable_if<
+ boost::is_member_function_pointer<RT (ClassT::*)()>,
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
+ , ClassA >
+ >::type const
+ bind(RT(ClassT::*f)() const, ClassA const& obj)
+ {
+ typedef
+ detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
+ fp_type;
+ return
+ detail::expression::function_eval<fp_type, ClassA>::make(
+ fp_type(f)
+ , obj
+ );
+ }
+
+ template <typename RT, typename ClassT>
+ inline
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<0, RT, RT(ClassT::*)()>
+ , ClassT
+ >::type const
+ bind(RT(ClassT::*f)(), ClassT& obj)
+ {
+ typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , ClassT
+ >::make(
+ fp_type(f)
+ , obj
+ );
+ }
+
+ template <typename RT, typename ClassT>
+ inline
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<0, RT, RT(ClassT::*)() const>
+ , ClassT
+ >::type const
+ bind(RT(ClassT::*f)() const, ClassT& obj)
+ {
+ typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , ClassT
+ >::make(
+ fp_type(f)
+ , obj
+ );
+ }
+
+#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
+ #include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function.hpp>
+#else
+
+#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_member_function_" BOOST_PHOENIX_LIMIT_STR ".hpp")
+#endif
+
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_ACTOR_LIMIT), \
+ <boost/phoenix/bind/detail/cpp03/bind_member_function.hpp>))
+#include BOOST_PHOENIX_ITERATE()
+
+#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(output: null)
+#endif
+
+#endif
+
+}}
+
+#else
+
+ template <
+ typename RT
+ , typename ClassT
+ , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
+ , typename ClassA
+ , BOOST_PHOENIX_typename_A
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ >
+ , ClassA
+ , BOOST_PHOENIX_A
+ >::type const
+ bind(
+ RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ , ClassA const & obj
+ , BOOST_PHOENIX_A_const_ref_a
+ )
+ {
+ typedef detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ > fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , ClassA
+ , BOOST_PHOENIX_A
+ >::make(
+ fp_type(f)
+ , obj
+ , BOOST_PHOENIX_a
+ );
+ }
+
+ template <
+ typename RT
+ , typename ClassT
+ , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
+ , typename ClassA
+ , BOOST_PHOENIX_typename_A
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
+ >
+ , ClassA
+ , BOOST_PHOENIX_A
+ >::type const
+ bind(
+ RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
+ , ClassA const & obj
+ , BOOST_PHOENIX_A_const_ref_a
+ )
+ {
+ typedef detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T)) const
+ > fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , ClassA
+ , BOOST_PHOENIX_A
+ >::make(
+ fp_type(f)
+ , obj
+ , BOOST_PHOENIX_a
+ );
+ }
+
+ template <
+ typename RT
+ , typename ClassT
+ , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
+ , BOOST_PHOENIX_typename_A
+ >
+ inline
+ typename detail::expression::function_eval<
+ detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ >
+ , ClassT
+ , BOOST_PHOENIX_A
+ >::type const
+ bind(
+ RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ , ClassT & obj
+ , BOOST_PHOENIX_A_const_ref_a
+ )
+ {
+ typedef detail::member_function_ptr<
+ BOOST_PHOENIX_ITERATION
+ , RT
+ , RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
+ > fp_type;
+ return
+ detail::expression::function_eval<
+ fp_type
+ , ClassT
+ , BOOST_PHOENIX_A
+ >::make(
+ fp_type(f)
+ , obj
+ , BOOST_PHOENIX_a
+ );
+ }
+
+#endif
+
diff --git a/boost/phoenix/bind/detail/function_ptr.hpp b/boost/phoenix/bind/detail/cpp03/function_ptr.hpp
index 0764b4a96d..af80f93e76 100644
--- a/boost/phoenix/bind/detail/function_ptr.hpp
+++ b/boost/phoenix/bind/detail/cpp03/function_ptr.hpp
@@ -7,9 +7,6 @@
#if !BOOST_PHOENIX_IS_ITERATING
-#ifndef BOOST_PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP
-#define BOOST_PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP
-
#include <boost/phoenix/core/limits.hpp>
#include <boost/phoenix/support/iterate.hpp>
@@ -87,7 +84,7 @@ namespace boost { namespace phoenix { namespace detail
};
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
- #include <boost/phoenix/bind/detail/preprocessed/function_ptr.hpp>
+ #include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr.hpp>
#else
#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
@@ -107,7 +104,7 @@ namespace boost { namespace phoenix { namespace detail
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (2, BOOST_PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/bind/detail/function_ptr.hpp>))
+ <boost/phoenix/bind/detail/cpp03/function_ptr.hpp>))
#include BOOST_PHOENIX_ITERATE()
#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
@@ -118,8 +115,6 @@ namespace boost { namespace phoenix { namespace detail
}}} // namespace boost::phoenix::detail
-#endif
-
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
diff --git a/boost/phoenix/bind/detail/member_function_ptr.hpp b/boost/phoenix/bind/detail/cpp03/member_function_ptr.hpp
index 7854dfc6d3..cfade7d660 100644
--- a/boost/phoenix/bind/detail/member_function_ptr.hpp
+++ b/boost/phoenix/bind/detail/cpp03/member_function_ptr.hpp
@@ -7,9 +7,6 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#if !BOOST_PHOENIX_IS_ITERATING
-#ifndef BOOST_PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP
-#define BOOST_PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP
-
#include <boost/phoenix/core/limits.hpp>
#include <boost/phoenix/support/iterate.hpp>
@@ -76,7 +73,7 @@ namespace boost { namespace phoenix { namespace detail
};
#if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
- #include <boost/phoenix/bind/detail/preprocessed/member_function_ptr.hpp>
+ #include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr.hpp>
#else
#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
@@ -96,7 +93,7 @@ namespace boost { namespace phoenix { namespace detail
#define BOOST_PHOENIX_ITERATION_PARAMS \
(3, (1, BOOST_PHOENIX_COMPOSITE_LIMIT, \
- <boost/phoenix/bind/detail/member_function_ptr.hpp>))
+ <boost/phoenix/bind/detail/cpp03/member_function_ptr.hpp>))
#include BOOST_PHOENIX_ITERATE()
#if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
@@ -107,8 +104,6 @@ namespace boost { namespace phoenix { namespace detail
}}} // namespace boost::phoenix::detail
-#endif
-
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
diff --git a/boost/phoenix/bind/preprocessed/bind_function.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function.hpp
index 9d685e2809..db94e44e7e 100644
--- a/boost/phoenix/bind/preprocessed/bind_function.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function.hpp
@@ -9,15 +9,15 @@
#define BOOST_PHOENIX_PREPROCESSED_BIND_FUNCTION_HPP
#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/bind/preprocessed/bind_function_10.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/bind/preprocessed/bind_function_20.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/bind/preprocessed/bind_function_30.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/bind/preprocessed/bind_function_40.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/bind/preprocessed/bind_function_50.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
diff --git a/boost/phoenix/bind/preprocessed/bind_function_10.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_10.hpp
index 9f15847702..9f15847702 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_10.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_10.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_20.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_20.hpp
index d399281b05..d399281b05 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_20.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_20.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_30.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_30.hpp
index 1c484fbe51..1c484fbe51 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_30.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_30.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_40.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_40.hpp
index e385e54143..e385e54143 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_40.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_40.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_50.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_50.hpp
index c5943d1a9b..c5943d1a9b 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_50.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_50.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object.hpp
index 48c54d459a..565f7e77c1 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object.hpp
@@ -9,15 +9,15 @@
#define BOOST_PHOENIX_PREPROCESSED_BIND_FUNCTION_OBJECT_HPP
#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/bind/preprocessed/bind_function_object_10.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/bind/preprocessed/bind_function_object_20.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/bind/preprocessed/bind_function_object_30.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/bind/preprocessed/bind_function_object_40.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/bind/preprocessed/bind_function_object_50.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object_10.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_10.hpp
index afe633b0a6..afe633b0a6 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object_10.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_10.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object_20.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_20.hpp
index 0b2f9317b2..0b2f9317b2 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object_20.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_20.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object_30.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_30.hpp
index 231e796366..231e796366 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object_30.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_30.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object_40.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_40.hpp
index 46699d1e33..46699d1e33 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object_40.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_40.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_function_object_50.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_50.hpp
index 86b6801496..86b6801496 100644
--- a/boost/phoenix/bind/preprocessed/bind_function_object_50.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_function_object_50.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function.hpp
index 5934f3b3ee..8da1b00909 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function.hpp
@@ -9,15 +9,15 @@
#define BOOST_PHOENIX_PREPROCESSED_BIND_MEMBER_FUNCTION_HPP
#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/bind/preprocessed/bind_member_function_10.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/bind/preprocessed/bind_member_function_20.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/bind/preprocessed/bind_member_function_30.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/bind/preprocessed/bind_member_function_40.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/bind/preprocessed/bind_member_function_50.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function_10.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_10.hpp
index dbb1f241f8..dbb1f241f8 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function_10.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_10.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function_20.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_20.hpp
index c2a4554657..c2a4554657 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function_20.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_20.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function_30.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_30.hpp
index b1135d5d25..b1135d5d25 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function_30.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_30.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function_40.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_40.hpp
index 2b5eb9a00a..2b5eb9a00a 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function_40.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_40.hpp
diff --git a/boost/phoenix/bind/preprocessed/bind_member_function_50.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_50.hpp
index ecfa22ccd9..ecfa22ccd9 100644
--- a/boost/phoenix/bind/preprocessed/bind_member_function_50.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/bind_member_function_50.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr.hpp
index a03fcc09c7..0e5ebf9ef8 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr.hpp
@@ -9,15 +9,15 @@
#define BOOST_PHOENIX_PREPROCESSED_BIND_DETAIL_FUNCTION_PTR_HPP
#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/bind/detail/preprocessed/function_ptr_10.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/bind/detail/preprocessed/function_ptr_20.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/bind/detail/preprocessed/function_ptr_30.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/bind/detail/preprocessed/function_ptr_40.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/bind/detail/preprocessed/function_ptr_50.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr_10.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_10.hpp
index 77a36fe6a0..77a36fe6a0 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr_10.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_10.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr_20.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_20.hpp
index 873c7917c6..873c7917c6 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr_20.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_20.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr_30.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_30.hpp
index 7bf74c9fd1..7bf74c9fd1 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr_30.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_30.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr_40.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_40.hpp
index f7d905a48e..f7d905a48e 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr_40.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_40.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/function_ptr_50.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_50.hpp
index 00db2e9b6c..00db2e9b6c 100644
--- a/boost/phoenix/bind/detail/preprocessed/function_ptr_50.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/function_ptr_50.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr.hpp
index 83087bcf14..ef9d581d7f 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr.hpp
@@ -9,15 +9,15 @@
#define BOOST_PHOENIX_PREPROCESSED_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP
#if BOOST_PHOENIX_LIMIT <= 10
-#include <boost/phoenix/bind/detail/preprocessed/member_function_ptr_10.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
-#include <boost/phoenix/bind/detail/preprocessed/member_function_ptr_20.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
-#include <boost/phoenix/bind/detail/preprocessed/member_function_ptr_30.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
-#include <boost/phoenix/bind/detail/preprocessed/member_function_ptr_40.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
-#include <boost/phoenix/bind/detail/preprocessed/member_function_ptr_50.hpp>
+#include <boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_10.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_10.hpp
index b1b1548621..b1b1548621 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_10.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_10.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_20.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_20.hpp
index 4698d5f225..4698d5f225 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_20.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_20.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_30.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_30.hpp
index aca5fd5d12..aca5fd5d12 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_30.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_30.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_40.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_40.hpp
index 440a8642bd..440a8642bd 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_40.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_40.hpp
diff --git a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_50.hpp b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_50.hpp
index 6d46306887..6d46306887 100644
--- a/boost/phoenix/bind/detail/preprocessed/member_function_ptr_50.hpp
+++ b/boost/phoenix/bind/detail/cpp03/preprocessed/member_function_ptr_50.hpp