PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/Src/Dependencies/Boost/boost/proto/detail/make_expr_funop.hpp

http://hadesmem.googlecode.com/
C++ Header | 66 lines | 44 code | 13 blank | 9 comment | 3 complexity | 27daaf094a6645e59348712abbba26f2 MD5 | raw file
 1#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
 2
 3    #include <boost/proto/detail/preprocessed/make_expr_funop.hpp>
 4
 5#elif !defined(BOOST_PP_IS_ITERATING)
 6
 7    #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
 8        #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_expr_funop.hpp")
 9    #endif
10
11    ///////////////////////////////////////////////////////////////////////////////
12    /// \file make_expr_funop.hpp
13    /// Contains definition of make_expr\<\>::operator() member functions.
14    //
15    //  Copyright 2008 Eric Niebler. Distributed under the Boost
16    //  Software License, Version 1.0. (See accompanying file
17    //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
18
19    #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
20        #pragma wave option(preserve: 1)
21    #endif
22
23    #define BOOST_PP_ITERATION_PARAMS_1                                                     \
24        (3, (2, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/make_expr_funop.hpp>))
25    #include BOOST_PP_ITERATE()
26
27    #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
28        #pragma wave option(output: null)
29    #endif
30
31#else // BOOST_PP_IS_ITERATING
32
33    #define N BOOST_PP_ITERATION()
34
35    template<typename This BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
36    struct result<This(BOOST_PP_ENUM_PARAMS(N, A))>
37    {
38        typedef
39            typename result_of::make_expr<
40                Tag
41              , Domain
42                BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
43            >::type
44        type;
45    };
46
47    /// \overload
48    ///
49    template<BOOST_PP_ENUM_PARAMS(N, typename A)>
50    typename result_of::make_expr<
51        Tag
52      , Domain
53        BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
54    >::type const
55    operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, const A, &a)) const
56    {
57        return proto::detail::make_expr_<
58            Tag
59          , Domain
60            BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
61        >()(BOOST_PP_ENUM_PARAMS(N, a));
62    }
63
64    #undef N
65
66#endif