File indexing completed on 2025-01-18 09:41:37
0001
0002 #ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/clear.hpp>
0018 #include <boost/mpl/push_front.hpp>
0019 #include <boost/mpl/reverse_fold.hpp>
0020 #include <boost/mpl/iterator_range.hpp>
0021 #include <boost/mpl/next.hpp>
0022 #include <boost/mpl/aux_/na.hpp>
0023
0024 namespace boost { namespace mpl {
0025
0026
0027
0028
0029 template< typename Tag >
0030 struct erase_impl
0031 {
0032 template<
0033 typename Sequence
0034 , typename First
0035 , typename Last
0036 >
0037 struct apply
0038 {
0039 typedef typename if_na< Last,typename next<First>::type >::type last_;
0040
0041
0042 typedef iterator_range<
0043 typename begin<Sequence>::type
0044 , First
0045 > first_half_;
0046
0047
0048 typedef iterator_range<
0049 last_
0050 , typename end<Sequence>::type
0051 > second_half_;
0052
0053 typedef typename reverse_fold<
0054 second_half_
0055 , typename clear<Sequence>::type
0056 , push_front<_,_>
0057 >::type half_sequence_;
0058
0059 typedef typename reverse_fold<
0060 first_half_
0061 , half_sequence_
0062 , push_front<_,_>
0063 >::type type;
0064 };
0065 };
0066
0067 }}
0068
0069 #endif