2 #ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
3 #define BOOST_MPL_AUX_INSERT_RANGE_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/copy.hpp>
18 #include <boost/mpl/clear.hpp>
19 #include <boost/mpl/front_inserter.hpp>
20 #include <boost/mpl/joint_view.hpp>
21 #include <boost/mpl/iterator_range.hpp>
22 #include <boost/mpl/aux_/na_spec.hpp>
23 #include <boost/mpl/aux_/iter_push_front.hpp>
24 #include <boost/mpl/aux_/traits_lambda_spec.hpp>
25 #include <boost/mpl/aux_/config/forwarding.hpp>
27 #include <boost/type_traits/same_traits.hpp>
29 namespace boost { namespace mpl {
31 // default implementation; conrete sequences might override it by
32 // specializing either the 'insert_range_impl' or the primary
33 // 'insert_range' template
36 template< typename Tag >
37 struct insert_range_impl
45 #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
48 iterator_range<typename begin<Sequence>::type,Pos>
51 , iterator_range<Pos,typename end<Sequence>::type>
54 , front_inserter< typename clear<Sequence>::type >
59 typedef typename reverse_copy<
61 iterator_range<typename begin<Sequence>::type,Pos>
64 , iterator_range<Pos,typename end<Sequence>::type>
67 , front_inserter< typename clear<Sequence>::type >
73 BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl)
77 #endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED