2 #ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
3 #define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2000-2004
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 // See http://www.boost.org/libs/mpl for documentation.
17 #include <boost/mpl/clear.hpp>
18 #include <boost/mpl/push_front.hpp>
19 #include <boost/mpl/reverse_fold.hpp>
20 #include <boost/mpl/iterator_range.hpp>
21 #include <boost/mpl/next.hpp>
22 #include <boost/mpl/aux_/na.hpp>
24 namespace boost { namespace mpl {
26 // default implementation; conrete sequences might override it by
27 // specializing either the 'erase_impl' or the primary 'erase' template
29 template< typename Tag >
39 typedef typename if_na< Last,typename next<First>::type >::type last_;
41 // 1st half: [begin, first)
42 typedef iterator_range<
43 typename begin<Sequence>::type
47 // 2nd half: [last, end) ... that is, [last + 1, end)
48 typedef iterator_range<
50 , typename end<Sequence>::type
53 typedef typename reverse_fold<
55 , typename clear<Sequence>::type
57 >::type half_sequence_;
59 typedef typename reverse_fold<
69 #endif // BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED