X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Ffusion%2Fsequence%2Fintrinsic%2Fsegments.hpp;fp=boost%2Ffusion%2Fsequence%2Fintrinsic%2Fsegments.hpp;h=afd5d400eb4cd781a964b9a8d1a19dabb7277d0d;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/fusion/sequence/intrinsic/segments.hpp b/boost/fusion/sequence/intrinsic/segments.hpp new file mode 100644 index 0000000..afd5d40 --- /dev/null +++ b/boost/fusion/sequence/intrinsic/segments.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2006 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_SEGMENTS_04052005_1141) +#define BOOST_FUSION_SEGMENTS_04052005_1141 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + // Special tags: + struct sequence_facade_tag; + struct iterator_range_tag; + + // segments: returns a sequence of sequences + namespace extension + { + template + struct segments_impl + { + template + struct apply {}; + }; + + template <> + struct segments_impl + { + template + struct apply : Sequence::template segments {}; + }; + + template <> + struct segments_impl; + } + + namespace result_of + { + template + struct segments + { + typedef typename traits::tag_of::type tag_type; + + typedef typename + extension::segments_impl::template apply::type + type; + }; + } + + template + inline typename + lazy_disable_if< + is_const + , result_of::segments + >::type + segments(Sequence& seq) + { + typedef typename traits::tag_of::type tag_type; + return extension::segments_impl::template apply::call(seq); + } + + template + inline typename result_of::segments::type + segments(Sequence const& seq) + { + typedef typename traits::tag_of::type tag_type; + return extension::segments_impl::template apply::call(seq); + } +}} + +#endif