PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp

http://hadesmem.googlecode.com/
C++ Header | 43 lines | 23 code | 9 blank | 11 comment | 0 complexity | 919a12d652739b686f177a3fd8ac65e1 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2007 Joel de Guzman
 3
 4    Distributed under the Boost Software License, Version 1.0. (See accompanying 
 5    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6==============================================================================*/
 7#if !defined(BOOST_PP_IS_ITERATING)
 8#if !defined(PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP)
 9#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP
10
11#include <boost/preprocessor/iterate.hpp>
12#include <boost/preprocessor/dec.hpp>
13#include <boost/preprocessor/repetition/enum_params.hpp>
14#include <boost/preprocessor/repetition/enum_binary_params.hpp>
15
16#define BOOST_PP_ITERATION_PARAMS_1                                             \
17    (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT),                              \
18    "boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp"))
19#include BOOST_PP_ITERATE()
20
21#endif
22
23///////////////////////////////////////////////////////////////////////////////
24//
25//  Preprocessor vertical repetition code
26//
27///////////////////////////////////////////////////////////////////////////////
28#else // defined(BOOST_PP_IS_ITERATING)
29
30#define N BOOST_PP_ITERATION()
31
32    template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)>
33    inline actor<typename as_composite<detail::function_eval<N>, F
34      , BOOST_PP_ENUM_PARAMS(N, A)>::type>
35    bind(F const& f, BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _))
36    {
37        return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _));
38    }
39
40#undef N
41#endif // defined(BOOST_PP_IS_ITERATING)
42
43