X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Ffusion%2Fview%2Fiterator_range%2Fdetail%2Fsegments_impl.hpp;fp=boost%2Ffusion%2Fview%2Fiterator_range%2Fdetail%2Fsegments_impl.hpp;h=ede49683d07764fea292673f907a324d43e52666;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/fusion/view/iterator_range/detail/segments_impl.hpp b/boost/fusion/view/iterator_range/detail/segments_impl.hpp new file mode 100644 index 0000000..ede4968 --- /dev/null +++ b/boost/fusion/view/iterator_range/detail/segments_impl.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2011 Eric Niebler + + 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(BOOST_FUSION_ITERATOR_RANGE_SEGMENTS_HPP_INCLUDED) +#define BOOST_FUSION_ITERATOR_RANGE_SEGMENTS_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct iterator_range_tag; + + namespace extension + { + template + struct segments_impl; + + template <> + struct segments_impl + { + template + struct apply + { + typedef + detail::make_segmented_range< + typename Sequence::begin_type + , typename Sequence::end_type + > + impl; + + BOOST_MPL_ASSERT((traits::is_segmented)); + + typedef + typename result_of::segments::type + type; + + static type call(Sequence & seq) + { + return fusion::segments(impl::call(seq.first, seq.last)); + } + }; + }; + } +}} + +#endif