]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | |
2 | // (C) Copyright Tobias Schwinger | |
3 | // | |
4 | // Use modification and distribution are subject to the boost Software License, | |
5 | // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). | |
6 | ||
7 | //------------------------------------------------------------------------------ | |
8 | ||
9 | #ifndef BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED | |
10 | #define BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED | |
11 | ||
12 | #include <boost/mpl/size_fwd.hpp> | |
13 | #include <boost/mpl/empty_fwd.hpp> | |
14 | #include <boost/mpl/front_fwd.hpp> | |
15 | #include <boost/mpl/back_fwd.hpp> | |
16 | #include <boost/mpl/at_fwd.hpp> | |
17 | #include <boost/mpl/begin_end_fwd.hpp> | |
18 | #include <boost/mpl/clear_fwd.hpp> | |
19 | #include <boost/mpl/push_front_fwd.hpp> | |
20 | #include <boost/mpl/pop_front_fwd.hpp> | |
21 | #include <boost/mpl/push_back_fwd.hpp> | |
22 | #include <boost/mpl/pop_back_fwd.hpp> | |
23 | ||
24 | namespace boost { namespace mpl { | |
25 | ||
26 | template<> struct size_impl | |
27 | < function_types::detail::components_mpl_sequence_tag > | |
28 | { | |
29 | template< typename S > struct apply | |
30 | : mpl::size <typename S::types> | |
31 | { }; | |
32 | }; | |
33 | template<> struct empty_impl | |
34 | < function_types::detail::components_mpl_sequence_tag > | |
35 | { | |
36 | template< typename S > struct apply | |
37 | : mpl::empty <typename S::types> | |
38 | { }; | |
39 | }; | |
40 | template<> struct front_impl | |
41 | < function_types::detail::components_mpl_sequence_tag > | |
42 | { | |
43 | template< typename S > struct apply | |
44 | : mpl::front <typename S::types> | |
45 | { }; | |
46 | }; | |
47 | template<> struct back_impl | |
48 | < function_types::detail::components_mpl_sequence_tag > | |
49 | { | |
50 | template< typename S > struct apply | |
51 | : mpl::back <typename S::types> | |
52 | { }; | |
53 | }; | |
54 | template<> struct at_impl | |
55 | < function_types::detail::components_mpl_sequence_tag > | |
56 | { | |
57 | template< typename S, typename N > struct apply | |
58 | : mpl::at <typename S::types, N > | |
59 | { }; | |
60 | }; | |
61 | template<> struct begin_impl | |
62 | < function_types::detail::components_mpl_sequence_tag > | |
63 | { | |
64 | template< typename S > struct apply | |
65 | : mpl::begin <typename S::types> | |
66 | { }; | |
67 | }; | |
68 | template<> struct end_impl | |
69 | < function_types::detail::components_mpl_sequence_tag > | |
70 | { | |
71 | template< typename S > struct apply | |
72 | : mpl::end <typename S::types> | |
73 | { }; | |
74 | }; | |
75 | template<> struct clear_impl | |
76 | < function_types::detail::components_mpl_sequence_tag > | |
77 | { | |
78 | template< typename S > | |
79 | struct apply | |
80 | : S | |
81 | { | |
82 | typedef apply type; | |
83 | typedef typename mpl::clear< typename S::types >::type types; | |
84 | }; | |
85 | }; | |
86 | template<> | |
87 | struct push_front_impl | |
88 | < function_types::detail::components_mpl_sequence_tag > | |
89 | { | |
90 | template< typename S, typename T > | |
91 | struct apply | |
92 | : S | |
93 | { | |
94 | typedef apply type; | |
95 | typedef typename mpl::push_front< typename S::types, T >::type types; | |
96 | }; | |
97 | }; | |
98 | template<> | |
99 | struct pop_front_impl | |
100 | < function_types::detail::components_mpl_sequence_tag > | |
101 | { | |
102 | template< typename S > | |
103 | struct apply | |
104 | : S | |
105 | { | |
106 | typedef apply type; | |
107 | typedef typename mpl::pop_front< typename S::types >::type types; | |
108 | }; | |
109 | }; | |
110 | template<> | |
111 | struct push_back_impl | |
112 | < function_types::detail::components_mpl_sequence_tag > | |
113 | { | |
114 | template< typename S, typename T > | |
115 | struct apply | |
116 | : S | |
117 | { | |
118 | typedef apply type; | |
119 | typedef typename mpl::push_back< typename S::types, T >::type types; | |
120 | }; | |
121 | }; | |
122 | template<> | |
123 | struct pop_back_impl | |
124 | < function_types::detail::components_mpl_sequence_tag > | |
125 | { | |
126 | template< typename S > | |
127 | struct apply | |
128 | : S | |
129 | { | |
130 | typedef apply type; | |
131 | typedef typename mpl::pop_back< typename S::types >::type types; | |
132 | }; | |
133 | }; | |
134 | ||
135 | } } // namespace ::boost::mpl | |
136 | ||
137 | #endif | |
138 |