示例#1
0
    inline typename result_of::insert_range<Sequence const, Position, Range const>::type
    insert_range(Sequence const& seq, Position const& pos, Range const& range)
    {
        typedef result_of::insert_range<Sequence const, Position, Range const> 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<Position>::call(pos));
        right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
        left_insert_type left_insert(left, range);
        return result(left_insert, right);
    }
示例#2
0
    inline typename result_of::insert<
        Sequence const, Position, T>::type
    insert(Sequence const& seq, Position const& pos, T const& x)
    {
        typedef result_of::insert<
            Sequence const, Position, T>
        result_of;
        typedef typename result_of::left_type left_type;
        typedef typename result_of::right_type right_type;
        typedef typename result_of::single_view single_view;
        typedef typename result_of::left_insert_type left_insert_type;
        typedef typename result_of::type result;

        left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
        right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
        single_view insert(x);
        left_insert_type left_insert(left, insert);
        return result(left_insert, right);
    }
示例#3
0
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::insert<Sequence const, Position, T>
>::type
insert(Sequence const& seq, Position const& pos, T const& x)
{
    typedef result_of::insert<
    Sequence const, Position, T>
    result_of;
    typedef typename result_of::left_type left_type;
    typedef typename result_of::right_type right_type;
    typedef typename result_of::single_view single_view;
    typedef typename result_of::left_insert_type left_insert_type;
    typedef typename result_of::type result;

    left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
    right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
    single_view insert(x);
    left_insert_type left_insert(left, insert);
    return result(left_insert, right);
}