forked from boostorg/fusion
new cleaner(?) implementation for segmented fusion
[SVN r73644]
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
/*=============================================================================
|
||||
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_SIZE_IMPL_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_ITERATOR_RANGE_SIZE_IMPL_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct iterator_range_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct size_impl;
|
||||
|
||||
template <>
|
||||
struct size_impl<iterator_range_tag>
|
||||
{
|
||||
template <typename Seq>
|
||||
struct apply
|
||||
: result_of::distance<
|
||||
typename Seq::begin_type,
|
||||
typename Seq::end_type
|
||||
>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <boost/fusion/view/iterator_range/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/view/iterator_range/detail/end_impl.hpp>
|
||||
#include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
|
||||
#include <boost/fusion/view/iterator_range/detail/size_impl.hpp>
|
||||
#include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
|
||||
#include <boost/config.hpp>
|
||||
@ -36,7 +37,6 @@ namespace boost { namespace fusion
|
||||
typedef typename convert_iterator<Last>::type end_type;
|
||||
typedef iterator_range_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
||||
typedef typename result_of::distance<begin_type, end_type>::type size;
|
||||
typedef mpl::true_ is_view;
|
||||
|
||||
typedef typename traits::category_of<begin_type>::type category;
|
||||
|
Reference in New Issue
Block a user