Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/spirit/home/qi/nonterminal/detail/fcall.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /*============================================================================= | |
2 Copyright (c) 2001-2011 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 | |
9 #include <boost/preprocessor/iterate.hpp> | |
10 #include <boost/preprocessor/repetition/enum_params.hpp> | |
11 #include <boost/preprocessor/repetition/enum_binary_params.hpp> | |
12 | |
13 #define BOOST_PP_FILENAME_1 \ | |
14 <boost/spirit/home/qi/nonterminal/detail/fcall.hpp> | |
15 #define BOOST_PP_ITERATION_LIMITS (1, SPIRIT_ARGUMENTS_LIMIT) | |
16 #include BOOST_PP_ITERATE() | |
17 | |
18 /////////////////////////////////////////////////////////////////////////////// | |
19 // | |
20 // Preprocessor vertical repetition code | |
21 // | |
22 /////////////////////////////////////////////////////////////////////////////// | |
23 #else // defined(BOOST_PP_IS_ITERATING) | |
24 | |
25 #define N BOOST_PP_ITERATION() | |
26 | |
27 template <BOOST_PP_ENUM_PARAMS(N, typename A)> | |
28 typename lazy_enable_if_c< | |
29 (params_size == N) | |
30 , proto::terminal< | |
31 spirit::qi::parameterized_nonterminal< | |
32 parameterized_subject_type | |
33 , fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> > | |
34 > | |
35 >::type | |
36 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& f)) const | |
37 { | |
38 typedef fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> vector_type; | |
39 typedef spirit::qi::parameterized_nonterminal< | |
40 parameterized_subject_type, vector_type> parameterized_type; | |
41 typedef typename proto::terminal<parameterized_type>::type result_type; | |
42 | |
43 return result_type::make( | |
44 parameterized_type( | |
45 this->get_parameterized_subject() | |
46 , fusion::make_vector(BOOST_PP_ENUM_PARAMS(N, f))) | |
47 ); | |
48 } | |
49 | |
50 #undef N | |
51 #endif // defined(BOOST_PP_IS_ITERATING) | |
52 | |
53 |