/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_INSERT_RANGE_009172005_1147) #define FUSION_INSERT_RANGE_009172005_1147 #include #include #include #include #include #include #include #include #include namespace boost { namespace fusion { namespace result_of { template struct insert_range { typedef typename convert_iterator::type pos_type; typedef typename result_of::begin::type first_type; typedef typename result_of::end::type last_type; typedef iterator_range left_type; typedef iterator_range right_type; typedef joint_view left_insert_type; typedef joint_view type; }; } template BOOST_FUSION_GPU_ENABLED inline typename result_of::insert_range::type insert_range(Sequence const& seq, Position const& pos, Range const& range) { typedef result_of::insert_range result_of; typedef typename result_of::left_type left_type; typedef typename result_of::right_type right_type; typedef typename result_of::left_insert_type left_insert_type; typedef typename result_of::type result; left_type left(fusion::begin(seq), convert_iterator::call(pos)); right_type right(convert_iterator::call(pos), fusion::end(seq)); left_insert_type left_insert(left, range); return result(left_insert, right); } }} #endif