2 // (C) Copyright Tobias Schwinger
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).
7 //------------------------------------------------------------------------------
9 #ifndef BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED
10 #define BOOST_FT_DETAIL_COMPONENTS_AS_MPL_SEQUENCE_HPP_INCLUDED
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>
24 namespace boost { namespace mpl {
26 template<> struct size_impl
27 < function_types::detail::components_mpl_sequence_tag >
29 template< typename S > struct apply
30 : mpl::size <typename S::types>
33 template<> struct empty_impl
34 < function_types::detail::components_mpl_sequence_tag >
36 template< typename S > struct apply
37 : mpl::empty <typename S::types>
40 template<> struct front_impl
41 < function_types::detail::components_mpl_sequence_tag >
43 template< typename S > struct apply
44 : mpl::front <typename S::types>
47 template<> struct back_impl
48 < function_types::detail::components_mpl_sequence_tag >
50 template< typename S > struct apply
51 : mpl::back <typename S::types>
54 template<> struct at_impl
55 < function_types::detail::components_mpl_sequence_tag >
57 template< typename S, typename N > struct apply
58 : mpl::at <typename S::types, N >
61 template<> struct begin_impl
62 < function_types::detail::components_mpl_sequence_tag >
64 template< typename S > struct apply
65 : mpl::begin <typename S::types>
68 template<> struct end_impl
69 < function_types::detail::components_mpl_sequence_tag >
71 template< typename S > struct apply
72 : mpl::end <typename S::types>
75 template<> struct clear_impl
76 < function_types::detail::components_mpl_sequence_tag >
78 template< typename S >
83 typedef typename mpl::clear< typename S::types >::type types;
87 struct push_front_impl
88 < function_types::detail::components_mpl_sequence_tag >
90 template< typename S, typename T >
95 typedef typename mpl::push_front< typename S::types, T >::type types;
100 < function_types::detail::components_mpl_sequence_tag >
102 template< typename S >
107 typedef typename mpl::pop_front< typename S::types >::type types;
111 struct push_back_impl
112 < function_types::detail::components_mpl_sequence_tag >
114 template< typename S, typename T >
119 typedef typename mpl::push_back< typename S::types, T >::type types;
124 < function_types::detail::components_mpl_sequence_tag >
126 template< typename S >
131 typedef typename mpl::pop_back< typename S::types >::type types;
135 } } // namespace ::boost::mpl