Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:17:01

0001 /*=============================================================================
0002     Copyright (c) 2001-2007 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 
0008 #if !BOOST_PHOENIX_IS_ITERATING
0009 
0010 #include <boost/phoenix/core/expression.hpp>
0011 #include <boost/phoenix/core/detail/function_eval.hpp>
0012 #include <boost/phoenix/bind/detail/cpp03/function_ptr.hpp>
0013 
0014 namespace boost { namespace phoenix {
0015 
0016     template <
0017         typename RT
0018     >
0019     inline
0020     typename detail::expression::function_eval<
0021         detail::function_ptr<0, RT, RT(*)()>
0022     >::type const
0023     bind(RT(*f)())
0024     {
0025         typedef detail::function_ptr<0, RT, RT(*)()> fp_type;
0026         return detail::expression::function_eval<fp_type>::make(fp_type(f));
0027     }
0028 
0029     template <
0030         typename RT
0031       , typename T0
0032       , typename A0
0033     >
0034     inline
0035     typename detail::expression::function_eval<
0036         detail::function_ptr<1, RT, RT(*)(T0)>
0037       , A0
0038     >::type const
0039     bind(RT(*f)(T0), A0 const & a0)
0040     {
0041         typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type;
0042         return detail::expression::function_eval<fp_type, A0>::make(fp_type(f), a0);
0043     }
0044 
0045 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
0046     #include <boost/phoenix/bind/detail/cpp03/preprocessed/bind_function.hpp>
0047 #else
0048 
0049 #if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0050     #pragma wave option(preserve: 2, line: 0, output: "preprocessed/bind_function_" BOOST_PHOENIX_LIMIT_STR ".hpp")
0051 #endif
0052 
0053 /*=============================================================================
0054     Copyright (c) 2001-2007 Joel de Guzman
0055 
0056     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0057     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0058 ==============================================================================*/
0059 
0060 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0061     #pragma wave option(preserve: 1)
0062 #endif
0063 
0064 #define BOOST_PHOENIX_ITERATION_PARAMS                                          \
0065     (3, (2, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT),                            \
0066             <boost/phoenix/bind/detail/cpp03/bind_function.hpp>))
0067 #include BOOST_PHOENIX_ITERATE()
0068 
0069 #if defined(__WAVE__) && defined (BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
0070     #pragma wave option(output: null)
0071 #endif
0072 
0073 #endif
0074 
0075 }}
0076 
0077 #else
0078 
0079     template <
0080         typename RT
0081       , BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, typename T)
0082       , BOOST_PHOENIX_typename_A
0083     >
0084     inline
0085     typename detail::expression::function_eval<
0086         detail::function_ptr<
0087             BOOST_PHOENIX_ITERATION
0088           , RT
0089           , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
0090         >
0091       , BOOST_PHOENIX_A
0092     >::type const
0093     bind(
0094         RT(*f)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
0095       , BOOST_PHOENIX_A_const_ref_a
0096     )
0097     {
0098         typedef detail::function_ptr<
0099             BOOST_PHOENIX_ITERATION
0100           , RT
0101           , RT(*)(BOOST_PP_ENUM_PARAMS(BOOST_PHOENIX_ITERATION, T))
0102         > fp_type;
0103         return
0104             detail::expression::function_eval<
0105                 fp_type
0106               , BOOST_PHOENIX_A
0107             >::make(
0108                 fp_type(f)
0109               , BOOST_PHOENIX_a
0110             );
0111     }
0112 
0113 #endif