progress with integrating the segmented Fusion work

[SVN r73831]
This commit is contained in:
Eric Niebler
2011-08-16 23:07:51 +00:00
parent 2212f57287
commit 2ccb8d604f
23 changed files with 74 additions and 42 deletions

View File

@ -8,7 +8,7 @@
#define BOOST_FUSION_FOLD_S_HPP_INCLUDED #define BOOST_FUSION_FOLD_S_HPP_INCLUDED
#include <boost/fusion/algorithm/iteration/fold.hpp> #include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/fusion/view/ext_/segmented_fold_until.hpp> #include <boost/fusion/support/segmented_fold_until.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -9,7 +9,7 @@
#include <boost/fusion/support/void.hpp> #include <boost/fusion/support/void.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp> #include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/view/ext_/segmented_fold_until.hpp> #include <boost/fusion/support/segmented_fold_until.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -10,7 +10,7 @@
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <boost/fusion/algorithm/query/find_if.hpp> #include <boost/fusion/algorithm/query/find_if.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/view/ext_/segmented_fold_until.hpp> #include <boost/fusion/support/segmented_fold_until.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -10,7 +10,7 @@
#include <boost/type_traits/remove_const.hpp> #include <boost/type_traits/remove_const.hpp>
#include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/algorithm/query/find.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/view/ext_/segmented_fold_until.hpp> #include <boost/fusion/support/segmented_fold_until.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -19,12 +19,12 @@
#include <boost/fusion/container/vector/vector10.hpp> #include <boost/fusion/container/vector/vector10.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/category_of.hpp> #include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segmented_size.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_size.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/view/ext_/segmented_iterator.hpp> #include <boost/fusion/iterator/segmented_iterator.hpp>
#include <boost/fusion/view/ext_/segmented_begin.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp>
#include <boost/fusion/view/ext_/segmented_end.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_end.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -9,6 +9,7 @@
#include <boost/fusion/iterator/iterator_facade.hpp> #include <boost/fusion/iterator/iterator_facade.hpp>
#include <boost/fusion/iterator/iterator_adapter.hpp> #include <boost/fusion/iterator/iterator_adapter.hpp>
#include <boost/fusion/iterator/segmented_iterator.hpp>
#include <boost/fusion/iterator/advance.hpp> #include <boost/fusion/iterator/advance.hpp>
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/distance.hpp> #include <boost/fusion/iterator/distance.hpp>

View File

@ -0,0 +1,12 @@
/*=============================================================================
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_SEGMENTED_ITERATOR_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_ITERATOR_HPP_INCLUDED
#include <boost/fusion/iterator/segmented_iterator/segmented_iterator.hpp>
#endif

View File

@ -13,9 +13,9 @@
#include <boost/fusion/container/generation/make_cons.hpp> #include <boost/fusion/container/generation/make_cons.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/view/ext_/detail/end_impl.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/end_impl.hpp>
#include <boost/fusion/view/ext_/segmented_fold_until.hpp> #include <boost/fusion/support/segmented_fold_until.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -13,8 +13,8 @@
#include <boost/fusion/view/iterator_range.hpp> #include <boost/fusion/view/iterator_range.hpp>
#include <boost/fusion/container/list/cons.hpp> #include <boost/fusion/container/list/cons.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {

View File

@ -13,7 +13,7 @@
#include <boost/fusion/container/list/cons.hpp> #include <boost/fusion/container/list/cons.hpp>
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/view/ext_/detail/begin_impl.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/begin_impl.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -10,8 +10,8 @@
#include <boost/mpl/bool.hpp> #include <boost/mpl/bool.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <boost/fusion/support/tag_of.hpp> #include <boost/fusion/support/tag_of.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segmented_size.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_size.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -4,8 +4,8 @@
Distributed under the Boost Software License, Version 1.0. (See accompanying 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_HPP_INCLUDED) #if !defined(BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_ITERATOR_HPP_INCLUDED #define BOOST_FUSION_SEGMENTED_ITERATOR_SEGMENTED_ITERATOR_HPP_INCLUDED
#include <boost/mpl/equal.hpp> #include <boost/mpl/equal.hpp>
#include <boost/mpl/transform.hpp> #include <boost/mpl/transform.hpp>
@ -18,9 +18,9 @@
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/view/ext_/detail/next_impl.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/next_impl.hpp>
#include <boost/fusion/view/ext_/segmented_begin.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp>
#include <boost/fusion/view/ext_/segmented_end.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_end.hpp>
#include <boost/fusion/container/vector/convert.hpp> #include <boost/fusion/container/vector/convert.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion

View File

@ -14,6 +14,7 @@
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/sequence/intrinsic/front.hpp> #include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/fusion/sequence/intrinsic/has_key.hpp> #include <boost/fusion/sequence/intrinsic/has_key.hpp>
#include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp> #include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/at_key.hpp> #include <boost/fusion/sequence/intrinsic/at_key.hpp>

View File

@ -7,7 +7,7 @@
#if !defined(BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED) #if !defined(BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED #define BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED
#include <boost/fusion/view/ext_/detail/begin_impl.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/begin_impl.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -8,7 +8,7 @@
#define BOOST_FUSION_SEGMENTED_END_HPP_INCLUDED #define BOOST_FUSION_SEGMENTED_END_HPP_INCLUDED
#include <boost/fusion/container/list/cons.hpp> #include <boost/fusion/container/list/cons.hpp>
#include <boost/fusion/view/ext_/detail/end_impl.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/end_impl.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -18,8 +18,8 @@
#include <boost/fusion/mpl/clear.hpp> #include <boost/fusion/mpl/clear.hpp>
#include <boost/fusion/mpl/push_front.hpp> #include <boost/fusion/mpl/push_front.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {

View File

@ -11,6 +11,10 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
// Special tags:
struct sequence_facade_tag;
struct iterator_range_tag;
// segments: returns a sequence of sequences // segments: returns a sequence of sequences
namespace extension namespace extension
{ {
@ -20,6 +24,16 @@ namespace boost { namespace fusion
template <typename Sequence> template <typename Sequence>
struct apply {}; struct apply {};
}; };
template <>
struct segments_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::template segments<Sequence> {};
};
template <>
struct segments_impl<iterator_range_tag>;
} }
namespace result_of namespace result_of

View File

@ -10,6 +10,7 @@
#include <boost/fusion/support/category_of.hpp> #include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/is_iterator.hpp> #include <boost/fusion/support/is_iterator.hpp>
#include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/support/iterator_base.hpp> #include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/support/pair.hpp> #include <boost/fusion/support/pair.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>

View File

@ -13,10 +13,6 @@ namespace boost { namespace fusion
{ {
// Special tags: // Special tags:
struct sequence_facade_tag; struct sequence_facade_tag;
struct boost_tuple_tag; // boost::tuples::tuple tag
struct boost_array_tag; // boost::array tag
struct mpl_sequence_tag; // mpl sequence tag
struct std_pair_tag; // std::pair tag
struct iterator_range_tag; struct iterator_range_tag;
namespace extension namespace extension
@ -30,6 +26,13 @@ namespace boost { namespace fusion
{}; {};
}; };
template <>
struct is_segmented_impl<sequence_facade_tag>
{
template <typename Sequence>
struct apply : Sequence::is_segmented {};
};
template <> template <>
struct is_segmented_impl<iterator_range_tag>; struct is_segmented_impl<iterator_range_tag>;
} }

View File

@ -24,8 +24,8 @@
#include <boost/fusion/iterator/value_of.hpp> #include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp> #include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
// fun(rng, state, context) // fun(rng, state, context)
// rng: a non-segmented range // rng: a non-segmented range

View File

@ -15,15 +15,15 @@
#include <boost/fusion/sequence/intrinsic/end.hpp> #include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segmented_size.hpp> #include <boost/fusion/sequence/intrinsic/detail/segmented_size.hpp>
#include <boost/fusion/algorithm/transformation/push_back.hpp> #include <boost/fusion/algorithm/transformation/push_back.hpp>
#include <boost/fusion/algorithm/transformation/push_front.hpp> #include <boost/fusion/algorithm/transformation/push_front.hpp>
#include <boost/fusion/view/iterator_range.hpp> #include <boost/fusion/view/iterator_range.hpp>
#include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/view/ext_/segmented_iterator.hpp> #include <boost/fusion/iterator/segmented_iterator.hpp>
#include <boost/fusion/view/ext_/detail/reverse_cons.hpp> #include <boost/fusion/container/list/detail/reverse_cons.hpp>
#include <boost/fusion/view/ext_/detail/segment_sequence.hpp> #include <boost/fusion/iterator/segmented_iterator/detail/segment_sequence.hpp>
// Invariants: // Invariants:
// - Each segmented iterator has a stack // - Each segmented iterator has a stack

View File

@ -12,7 +12,7 @@
#include <boost/fusion/container/ext_/tree.hpp> #include <boost/fusion/container/ext_/tree.hpp>
#include <boost/fusion/container/generation/make_vector.hpp> #include <boost/fusion/container/generation/make_vector.hpp>
#include <boost/fusion/view/iterator_range/iterator_range.hpp> #include <boost/fusion/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/view/ext_/segmented_iterator_range.hpp> #include <boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp>
#include <boost/fusion/sequence/comparison/equal_to.hpp> #include <boost/fusion/sequence/comparison/equal_to.hpp>
#include <boost/fusion/sequence/io/out.hpp> #include <boost/fusion/sequence/io/out.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>