PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/spirit/home/phoenix/object/detail/new.hpp

http://hadesmem.googlecode.com/
C++ Header | 42 lines | 22 code | 9 blank | 11 comment | 0 complexity | e0daee32d2f2c8c3b7c101232f5b0c8e 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#ifndef BOOST_PP_IS_ITERATING
 8#ifndef PHOENIX_OBJECT_DETAIL_NEW_HPP
 9#define PHOENIX_OBJECT_DETAIL_NEW_HPP
10
11#include <boost/preprocessor/iterate.hpp>
12#include <boost/preprocessor/repetition/enum_params.hpp>
13#include <boost/preprocessor/repetition/enum_binary_params.hpp>
14
15#define BOOST_PP_ITERATION_PARAMS_1                                             \
16    (3, (3, PHOENIX_COMPOSITE_LIMIT,                                            \
17    "boost/spirit/home/phoenix/object/detail/new.hpp"))
18#include BOOST_PP_ITERATE()
19
20#endif
21
22///////////////////////////////////////////////////////////////////////////////
23//
24//  Preprocessor vertical repetition code
25//
26///////////////////////////////////////////////////////////////////////////////
27#else // defined(BOOST_PP_IS_ITERATING)
28
29#define N BOOST_PP_ITERATION()
30
31    template <typename T, BOOST_PP_ENUM_PARAMS(N, typename A)>
32    inline actor<typename as_composite<detail::new_eval<T>
33        , BOOST_PP_ENUM_PARAMS(N, A)>::type>
34    new_(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _))
35    {
36        return compose<detail::new_eval<T> >(BOOST_PP_ENUM_PARAMS(N, _));
37    }
38
39#undef N
40#endif // defined(BOOST_PP_IS_ITERATING)
41
42