]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/metaparse/v1/impl/sequence.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / metaparse / v1 / impl / sequence.hpp
CommitLineData
7c673cae
FG
1#ifndef BOOST_METAPARSE_V1_IMPL_SEQUENCE_HPP
2#define BOOST_METAPARSE_V1_IMPL_SEQUENCE_HPP
3
4// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8
9#include <boost/metaparse/v1/impl/sequence_impl.hpp>
10#include <boost/metaparse/limit_sequence_size.hpp>
11
12#include <boost/mpl/vector.hpp>
13
14#include <boost/preprocessor/repetition/repeat_from_to.hpp>
15#include <boost/preprocessor/repetition/enum_params.hpp>
16#include <boost/preprocessor/cat.hpp>
17
18namespace boost
19{
20 namespace metaparse
21 {
22 namespace v1
23 {
24 namespace impl
25 {
26 #ifdef BOOST_METAPARSE_SEQUENCE_CASE
27 # error BOOST_METAPARSE_SEQUENCE_CASE already defined
28 #endif
29 #define BOOST_METAPARSE_SEQUENCE_CASE(z, n, unused) \
30 template <BOOST_PP_ENUM_PARAMS(n, class P)> \
31 struct BOOST_PP_CAT(sequence, n) \
32 { \
33 typedef BOOST_PP_CAT(sequence, n) type; \
34 \
35 template <class S, class Pos> \
36 struct apply : \
37 sequence_impl< \
38 boost::mpl::vector<BOOST_PP_ENUM_PARAMS(n, P)>, \
39 S, \
40 Pos \
41 > \
42 {}; \
43 };
44
45 BOOST_PP_REPEAT_FROM_TO(
46 1,
47 BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
48 BOOST_METAPARSE_SEQUENCE_CASE,
49 ~
50 )
51
52 #undef BOOST_METAPARSE_SEQUENCE_CASE
53 }
54 }
55 }
56}
57
58#endif
59