forked from boostorg/fusion
adapted/array is now using iterator_facade
[SVN r35317]
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
|
#include <boost/fusion/algorithm/query/detail/assoc_find.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/is_associative.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
#include <boost/type_traits/is_const.hpp>
|
#include <boost/type_traits/is_const.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#if !defined(FUSION_ITERATOR_10022005_0559)
|
#if !defined(FUSION_ITERATOR_10022005_0559)
|
||||||
#define FUSION_ITERATOR_10022005_0559
|
#define FUSION_ITERATOR_10022005_0559
|
||||||
|
|
||||||
|
#include <boost/fusion/iterator/iterator_facade.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>
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
struct random_access_traversal_tag;
|
struct random_access_traversal_tag;
|
||||||
|
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -37,11 +40,17 @@ namespace boost { namespace fusion
|
|||||||
, advance_detail::backward<Iterator, N::value>
|
, advance_detail::backward<Iterator, N::value>
|
||||||
>::type
|
>::type
|
||||||
{
|
{
|
||||||
typedef typename traits::category_of<Iterator>::type category;
|
BOOST_MPL_ASSERT_NOT((traits::is_random_access<Iterator>));
|
||||||
BOOST_MPL_ASSERT_NOT((is_same<category, random_access_traversal_tag>));
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct advance_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Iterator, typename N>
|
||||||
|
struct apply : Iterator::template advance<Iterator, N> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct advance_impl<array_iterator_tag>;
|
struct advance_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -26,6 +28,13 @@ namespace boost { namespace fusion
|
|||||||
struct apply {};
|
struct apply {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct deref_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Iterator>
|
||||||
|
struct apply : Iterator::template deref<Iterator> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct deref_impl<array_iterator_tag>;
|
struct deref_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
struct random_access_traversal_tag;
|
struct random_access_traversal_tag;
|
||||||
|
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -33,13 +36,18 @@ namespace boost { namespace fusion
|
|||||||
template <typename First, typename Last>
|
template <typename First, typename Last>
|
||||||
struct apply : distance_detail::linear_distance<First, Last>
|
struct apply : distance_detail::linear_distance<First, Last>
|
||||||
{
|
{
|
||||||
typedef typename traits::category_of<First>::type first_category;
|
BOOST_MPL_ASSERT_NOT((traits::is_random_access<First>));
|
||||||
typedef typename traits::category_of<Last>::type last_category;
|
BOOST_MPL_ASSERT_NOT((traits::is_random_access<Last>));
|
||||||
BOOST_MPL_ASSERT((is_same<first_category, last_category>));
|
|
||||||
BOOST_MPL_ASSERT_NOT((is_same<first_category, random_access_traversal_tag>));
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct distance_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename First, typename Last>
|
||||||
|
struct apply : First::template distance<First, Last> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct distance_impl<array_iterator_tag>;
|
struct distance_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -33,6 +35,13 @@ namespace boost { namespace fusion
|
|||||||
{};
|
{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct equal_to_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename I1, typename I2>
|
||||||
|
struct apply : I1::template equal_to<I1, I2> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct equal_to_impl<array_iterator_tag>;
|
struct equal_to_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
35
include/boost/fusion/iterator/iterator_facade.hpp
Normal file
35
include/boost/fusion/iterator/iterator_facade.hpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
Copyright (c) 2001-2006 Joel de Guzman
|
||||||
|
|
||||||
|
Use, modification and distribution is subject to 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(FUSION_ITERATOR_FACADE_09252006_1011)
|
||||||
|
#define FUSION_ITERATOR_FACADE_09252006_1011
|
||||||
|
|
||||||
|
#include <boost/fusion/support/iterator_base.hpp>
|
||||||
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
|
||||||
|
namespace boost { namespace fusion
|
||||||
|
{
|
||||||
|
struct iterator_facade_tag;
|
||||||
|
|
||||||
|
template <typename Derived, typename Category>
|
||||||
|
struct iterator_facade : iterator_base<Derived>
|
||||||
|
{
|
||||||
|
typedef iterator_facade_tag fusion_tag;
|
||||||
|
typedef Derived derived_type;
|
||||||
|
typedef Category category;
|
||||||
|
|
||||||
|
template <typename I1, typename I2>
|
||||||
|
struct equal_to // default implementation
|
||||||
|
: is_same<
|
||||||
|
typename I1::derived_type
|
||||||
|
, typename I2::derived_type
|
||||||
|
>
|
||||||
|
{};
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
|
||||||
|
#endif
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -25,6 +27,13 @@ namespace boost { namespace fusion
|
|||||||
struct apply {};
|
struct apply {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct next_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Iterator>
|
||||||
|
struct apply : Iterator::template next<Iterator> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct next_impl<array_iterator_tag>;
|
struct next_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -25,6 +27,13 @@ namespace boost { namespace fusion
|
|||||||
struct apply {};
|
struct apply {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct prior_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Iterator>
|
||||||
|
struct apply : Iterator::template prior<Iterator> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct prior_impl<array_iterator_tag>;
|
struct prior_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct iterator_facade_tag; // iterator facade tag
|
||||||
struct array_iterator_tag; // boost::array iterator tag
|
struct array_iterator_tag; // boost::array iterator tag
|
||||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||||
@ -26,6 +28,13 @@ namespace boost { namespace fusion
|
|||||||
struct apply {};
|
struct apply {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct value_of_impl<iterator_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Iterator>
|
||||||
|
struct apply : Iterator::template value_of<Iterator> {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct value_of_impl<array_iterator_tag>;
|
struct value_of_impl<array_iterator_tag>;
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#if !defined(FUSION_SEQUENCE_10022005_0559)
|
#if !defined(FUSION_SEQUENCE_10022005_0559)
|
||||||
#define FUSION_ITERATOR_10022005_0559
|
#define FUSION_ITERATOR_10022005_0559
|
||||||
|
|
||||||
|
#include <boost/fusion/sequence/sequence_facade.hpp>
|
||||||
#include <boost/fusion/sequence/container.hpp>
|
#include <boost/fusion/sequence/container.hpp>
|
||||||
#include <boost/fusion/sequence/comparison.hpp>
|
#include <boost/fusion/sequence/comparison.hpp>
|
||||||
#include <boost/fusion/sequence/conversion.hpp>
|
#include <boost/fusion/sequence/conversion.hpp>
|
||||||
|
@ -10,45 +10,119 @@
|
|||||||
#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250
|
#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/mpl/size_t.hpp>
|
#include <boost/mpl/size_t.hpp>
|
||||||
#include <boost/mpl/assert.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
#include <boost/type_traits/add_const.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
|
#include <boost/mpl/minus.hpp>
|
||||||
|
#include <boost/type_traits/is_const.hpp>
|
||||||
|
#include <boost/fusion/iterator/iterator_facade.hpp>
|
||||||
|
|
||||||
#include <boost/fusion/support/iterator_base.hpp>
|
namespace boost { namespace fusion
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/next_impl.hpp>
|
{
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/prior_impl.hpp>
|
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/advance_impl.hpp>
|
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/deref_impl.hpp>
|
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/value_of_impl.hpp>
|
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/distance_impl.hpp>
|
|
||||||
#include <boost/fusion/sequence/adapted/array/detail/equal_to_impl.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
|
||||||
|
|
||||||
struct array_iterator_tag;
|
|
||||||
struct random_access_traversal_tag;
|
struct random_access_traversal_tag;
|
||||||
|
|
||||||
template<typename Array, std::size_t Pos>
|
template<typename Array, std::size_t Pos>
|
||||||
struct array_iterator
|
struct array_iterator
|
||||||
: iterator_base<array_iterator<Array, Pos> >
|
: iterator_facade<array_iterator<Array, Pos>, random_access_traversal_tag>
|
||||||
{
|
{
|
||||||
BOOST_MPL_ASSERT_RELATION(Pos,>=,0);
|
BOOST_MPL_ASSERT_RELATION(Pos,>=,0);
|
||||||
BOOST_MPL_ASSERT_RELATION(Pos,<=,std::size_t(Array::static_size));
|
BOOST_MPL_ASSERT_RELATION(Pos,<=,std::size_t(Array::static_size));
|
||||||
|
|
||||||
typedef mpl::size_t<Pos> index;
|
typedef mpl::size_t<Pos> index;
|
||||||
typedef array_iterator_tag fusion_tag;
|
|
||||||
typedef random_access_traversal_tag category;
|
|
||||||
typedef Array array_type;
|
typedef Array array_type;
|
||||||
typedef array_iterator<
|
|
||||||
typename add_const<Array>::type, Pos> identity;
|
|
||||||
|
|
||||||
array_iterator(Array& a)
|
array_iterator(Array& a)
|
||||||
: array(a) {}
|
: array(a) {}
|
||||||
|
|
||||||
Array& array;
|
Array& array;
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct value_of
|
||||||
|
{
|
||||||
|
typedef typename Iterator::array_type array_type;
|
||||||
|
typedef typename array_type::value_type type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct deref
|
||||||
|
{
|
||||||
|
typedef typename Iterator::array_type array_type;
|
||||||
|
typedef typename
|
||||||
|
mpl::if_<
|
||||||
|
is_const<array_type>
|
||||||
|
, typename array_type::const_reference
|
||||||
|
, typename array_type::reference
|
||||||
|
>::type
|
||||||
|
type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const & it)
|
||||||
|
{
|
||||||
|
return it.array[Iterator::index::value];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct next
|
||||||
|
{
|
||||||
|
typedef typename Iterator::array_type array_type;
|
||||||
|
typedef typename Iterator::index index;
|
||||||
|
static int const index_val = index::value;
|
||||||
|
typedef array_iterator<array_type, index_val + 1> type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const& i)
|
||||||
|
{
|
||||||
|
return type(i.array);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator>
|
||||||
|
struct prior
|
||||||
|
{
|
||||||
|
typedef typename Iterator::array_type array_type;
|
||||||
|
typedef typename Iterator::index index;
|
||||||
|
static int const index_val = index::value;
|
||||||
|
typedef array_iterator<array_type, index_val - 1> type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const& i)
|
||||||
|
{
|
||||||
|
return type(i.array);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename Iterator, typename N>
|
||||||
|
struct advance
|
||||||
|
{
|
||||||
|
typedef typename Iterator::index index;
|
||||||
|
typedef typename Iterator::array_type array_type;
|
||||||
|
typedef array_iterator<array_type, index::value + N::value> type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(Iterator const& i)
|
||||||
|
{
|
||||||
|
return type(i.array);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename First, typename Last>
|
||||||
|
struct distance : mpl::minus<typename Last::index, typename First::index>
|
||||||
|
{
|
||||||
|
typedef typename mpl::minus<
|
||||||
|
typename Last::index, typename First::index>::type
|
||||||
|
type;
|
||||||
|
|
||||||
|
static type
|
||||||
|
call(First const&, Last const&)
|
||||||
|
{
|
||||||
|
return type();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
array_iterator<Array, Pos> operator=(const array_iterator<Array, Pos>&);
|
array_iterator<Array, Pos> operator=(const array_iterator<Array, Pos>&);
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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_ADVANCE_IMPL_27122005_0938)
|
|
||||||
#define BOOST_FUSION_ADVANCE_IMPL_27122005_0938
|
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
|
||||||
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
template<typename Array, std::size_t Pos>
|
|
||||||
struct array_iterator;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template<typename Tag>
|
|
||||||
struct advance_impl;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct advance_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template<typename Iterator, typename N>
|
|
||||||
struct apply
|
|
||||||
{
|
|
||||||
typedef typename Iterator::index index;
|
|
||||||
typedef typename Iterator::array_type array_type;
|
|
||||||
typedef array_iterator<array_type, index::value + N::value> type;
|
|
||||||
|
|
||||||
static type
|
|
||||||
call(Iterator const& i)
|
|
||||||
{
|
|
||||||
return type(i.array);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,49 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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_DEREF_IMPL_27122005_0951)
|
|
||||||
#define BOOST_FUSION_DEREF_IMPL_27122005_0951
|
|
||||||
|
|
||||||
#include <boost/mpl/if.hpp>
|
|
||||||
#include <boost/type_traits/is_const.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
|
||||||
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
template<typename Array, std::size_t Pos>
|
|
||||||
struct array_iterator;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template<typename Tag>
|
|
||||||
struct deref_impl;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct deref_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template<typename Iterator>
|
|
||||||
struct apply
|
|
||||||
{
|
|
||||||
typedef typename Iterator::array_type array_type;
|
|
||||||
typedef typename mpl::if_<
|
|
||||||
is_const<array_type>,
|
|
||||||
typename array_type::const_reference,
|
|
||||||
typename array_type::reference>::type type;
|
|
||||||
|
|
||||||
static type
|
|
||||||
call(Iterator const & it)
|
|
||||||
{
|
|
||||||
return it.array[Iterator::index::value];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,43 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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_DISTANCE_IMPL_27122005_1016)
|
|
||||||
#define BOOST_FUSION_DISTANCE_IMPL_27122005_1016
|
|
||||||
|
|
||||||
#include <boost/mpl/minus.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template <typename Tag>
|
|
||||||
struct distance_impl;
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct distance_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template <typename First, typename Last>
|
|
||||||
struct apply : mpl::minus<typename Last::index, typename First::index>
|
|
||||||
{
|
|
||||||
static typename mpl::minus<
|
|
||||||
typename Last::index, typename First::index>::type
|
|
||||||
call(First const&, Last const&)
|
|
||||||
{
|
|
||||||
typedef typename mpl::minus<
|
|
||||||
typename Last::index, typename First::index>::type
|
|
||||||
result;
|
|
||||||
return result();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,40 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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_EQUAL_TO_IMPL_27122005_1020)
|
|
||||||
#define BOOST_FUSION_EQUAL_TO_IMPL_27122005_1020
|
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
|
||||||
#include <boost/mpl/equal_to.hpp>
|
|
||||||
#include <boost/mpl/and.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template <typename Tag>
|
|
||||||
struct equal_to_impl;
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct equal_to_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template <typename I1, typename I2>
|
|
||||||
struct apply
|
|
||||||
: is_same<
|
|
||||||
typename I1::identity
|
|
||||||
, typename I2::identity
|
|
||||||
>
|
|
||||||
{};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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(FUSION_NEXT_IMPL_27122005_0927)
|
|
||||||
#define FUSION_NEXT_IMPL_27122005_0927
|
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
|
||||||
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
template<typename Array, std::size_t Pos>
|
|
||||||
struct array_iterator;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template<typename Tag>
|
|
||||||
struct next_impl;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct next_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template<typename Iterator>
|
|
||||||
struct apply
|
|
||||||
{
|
|
||||||
typedef typename Iterator::array_type array_type;
|
|
||||||
typedef typename Iterator::index index;
|
|
||||||
static int const index_val = index::value;
|
|
||||||
typedef array_iterator<array_type, index_val + 1> type;
|
|
||||||
|
|
||||||
static type
|
|
||||||
call(Iterator const& i)
|
|
||||||
{
|
|
||||||
return type(i.array);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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(FUSION_PRIOR_IMPL_27122005_0935)
|
|
||||||
#define FUSION_PRIOR_IMPL_27122005_0935
|
|
||||||
|
|
||||||
namespace boost { namespace fusion {
|
|
||||||
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
template<typename Array, std::size_t Pos>
|
|
||||||
struct array_iterator;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template<typename Tag>
|
|
||||||
struct prior_impl;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct prior_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template<typename Iterator>
|
|
||||||
struct apply
|
|
||||||
{
|
|
||||||
typedef typename Iterator::array_type array_type;
|
|
||||||
typedef typename Iterator::index index;
|
|
||||||
static int const index_val = index::value;
|
|
||||||
typedef array_iterator<array_type, index_val - 1> type;
|
|
||||||
|
|
||||||
static type
|
|
||||||
call(Iterator const& i)
|
|
||||||
{
|
|
||||||
return type(i.array);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,34 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2005-2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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_VALUE_OF_IMPL_27122005_1011)
|
|
||||||
#define BOOST_FUSION_VALUE_OF_IMPL_27122005_1011
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
struct array_iterator_tag;
|
|
||||||
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template <typename Tag>
|
|
||||||
struct value_of_impl;
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct value_of_impl<array_iterator_tag>
|
|
||||||
{
|
|
||||||
template <typename Iterator>
|
|
||||||
struct apply
|
|
||||||
{
|
|
||||||
typedef typename Iterator::array_type array_type;
|
|
||||||
typedef typename array_type::value_type type;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -16,6 +16,5 @@
|
|||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
#include <boost/fusion/support/tag_of.hpp>
|
#include <boost/fusion/support/tag_of.hpp>
|
||||||
#include <boost/fusion/support/tags.hpp>
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,23 +10,38 @@
|
|||||||
|
|
||||||
#include <boost/fusion/support/detail/category_of.hpp>
|
#include <boost/fusion/support/detail/category_of.hpp>
|
||||||
#include <boost/fusion/support/tag_of.hpp>
|
#include <boost/fusion/support/tag_of.hpp>
|
||||||
#include <boost/fusion/support/tags.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
struct array_tag; // boost::array tag
|
struct array_tag; // boost::array tag
|
||||||
struct mpl_sequence_tag; // mpl sequence tag
|
struct mpl_sequence_tag; // mpl sequence tag
|
||||||
struct std_pair_tag; // std::pair tag
|
struct std_pair_tag; // std::pair tag
|
||||||
|
|
||||||
|
struct incrementable_traversal_tag {};
|
||||||
|
|
||||||
|
struct single_pass_traversal_tag
|
||||||
|
: incrementable_traversal_tag {};
|
||||||
|
|
||||||
|
struct forward_traversal_tag
|
||||||
|
: single_pass_traversal_tag {};
|
||||||
|
|
||||||
|
struct bidirectional_traversal_tag
|
||||||
|
: forward_traversal_tag {};
|
||||||
|
|
||||||
|
struct random_access_traversal_tag
|
||||||
|
: bidirectional_traversal_tag {};
|
||||||
|
|
||||||
|
struct associative_sequence_tag {};
|
||||||
|
|
||||||
namespace extension
|
namespace extension
|
||||||
{
|
{
|
||||||
template<typename Tag>
|
template<typename Tag>
|
||||||
struct category_of_impl
|
struct category_of_impl
|
||||||
{
|
{
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct apply
|
struct apply : detail::fusion_category_of<T> {};
|
||||||
: detail::fusion_category_of<T>
|
|
||||||
{};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -46,6 +61,49 @@ namespace boost { namespace fusion
|
|||||||
: extension::category_of_impl<typename detail::tag_of<T>::type>::
|
: extension::category_of_impl<typename detail::tag_of<T>::type>::
|
||||||
template apply<T>
|
template apply<T>
|
||||||
{};
|
{};
|
||||||
}}}
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_associative
|
||||||
|
: is_base_of<
|
||||||
|
associative_sequence_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_incrementable
|
||||||
|
: is_base_of<
|
||||||
|
incrementable_traversal_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_single_pass
|
||||||
|
: is_base_of<
|
||||||
|
single_pass_traversal_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_forward
|
||||||
|
: is_base_of<
|
||||||
|
forward_traversal_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_bidirectional
|
||||||
|
: is_base_of<
|
||||||
|
bidirectional_traversal_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct is_random_access
|
||||||
|
: is_base_of<
|
||||||
|
random_access_traversal_tag
|
||||||
|
, typename category_of<T>::type>
|
||||||
|
{};
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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(FUSION_ITERATOR_TO_SEQUENCE_CATEGORY_07212005_0726)
|
|
||||||
#define FUSION_ITERATOR_TO_SEQUENCE_CATEGORY_07212005_0726
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
struct incrementable_traversal_tag;
|
|
||||||
struct single_pass_traversal_tag;
|
|
||||||
struct forward_traversal_tag;
|
|
||||||
struct bidirectional_traversal_tag;
|
|
||||||
struct random_access_traversal_tag;
|
|
||||||
|
|
||||||
struct incrementable_sequence_tag;
|
|
||||||
struct single_pass_sequence_tag;
|
|
||||||
struct forward_sequence_tag;
|
|
||||||
struct bidirectional_sequence_tag;
|
|
||||||
struct random_access_sequence_tag;
|
|
||||||
}}
|
|
||||||
|
|
||||||
namespace boost { namespace fusion { namespace detail
|
|
||||||
{
|
|
||||||
template <typename Category>
|
|
||||||
struct iterator_to_sequence_category;
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_to_sequence_category<incrementable_traversal_tag>
|
|
||||||
{
|
|
||||||
typedef incrementable_sequence_tag type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_to_sequence_category<single_pass_traversal_tag>
|
|
||||||
{
|
|
||||||
typedef single_pass_sequence_tag type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_to_sequence_category<forward_traversal_tag>
|
|
||||||
{
|
|
||||||
typedef forward_sequence_tag type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_to_sequence_category<bidirectional_traversal_tag>
|
|
||||||
{
|
|
||||||
typedef bidirectional_sequence_tag type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct iterator_to_sequence_category<random_access_traversal_tag>
|
|
||||||
{
|
|
||||||
typedef random_access_sequence_tag type;
|
|
||||||
};
|
|
||||||
}}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
Copyright (c) 2006 Dan Marsden
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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(FUSION_IS_ASSOCIATIVE_09242005_1018)
|
|
||||||
#define FUSION_IS_ASSOCIATIVE_09242005_1018
|
|
||||||
|
|
||||||
#include <boost/mpl/bool.hpp>
|
|
||||||
#include <boost/fusion/support/tag_of.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
namespace extension
|
|
||||||
{
|
|
||||||
template<typename Tag>
|
|
||||||
struct is_associative_impl
|
|
||||||
{
|
|
||||||
template<typename Seq>
|
|
||||||
struct apply : mpl::false_ {};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace traits
|
|
||||||
{
|
|
||||||
template <typename Seq>
|
|
||||||
struct is_associative
|
|
||||||
: extension::is_associative_impl<typename detail::tag_of<Seq>::type>::
|
|
||||||
template apply<Seq>
|
|
||||||
{};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
@ -8,14 +8,14 @@
|
|||||||
#if !defined(FUSION_IS_ITERATOR_05062005_1219)
|
#if !defined(FUSION_IS_ITERATOR_05062005_1219)
|
||||||
#define FUSION_IS_ITERATOR_05062005_1219
|
#define FUSION_IS_ITERATOR_05062005_1219
|
||||||
|
|
||||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
struct iterator_root;
|
struct iterator_root;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_fusion_iterator : is_base_and_derived<iterator_root, T> {};
|
struct is_fusion_iterator : is_base_of<iterator_root, T> {};
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#if !defined(FUSION_IS_SEQUENCE_05052005_1002)
|
#if !defined(FUSION_IS_SEQUENCE_05052005_1002)
|
||||||
#define FUSION_IS_SEQUENCE_05052005_1002
|
#define FUSION_IS_SEQUENCE_05052005_1002
|
||||||
|
|
||||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
#include <boost/fusion/support/tag_of.hpp>
|
#include <boost/fusion/support/tag_of.hpp>
|
||||||
#include <boost/mpl/is_sequence.hpp>
|
#include <boost/mpl/is_sequence.hpp>
|
||||||
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
struct non_fusion_tag;
|
struct non_fusion_tag;
|
||||||
struct array_tag; // boost::array tag
|
struct array_tag; // boost::array tag
|
||||||
struct mpl_sequence_tag; // mpl sequence tag
|
struct mpl_sequence_tag; // mpl sequence tag
|
||||||
@ -26,18 +27,15 @@ namespace boost { namespace fusion
|
|||||||
{
|
{
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_sequence_impl
|
struct is_sequence_impl
|
||||||
: is_base_and_derived<sequence_root, T>
|
|
||||||
{
|
{
|
||||||
template<typename Sequence>
|
template <typename Sequence>
|
||||||
struct apply
|
struct apply : is_base_of<sequence_root, Sequence> {};
|
||||||
: is_base_and_derived<sequence_root, Sequence>
|
|
||||||
{};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct is_sequence_impl<non_fusion_tag>
|
struct is_sequence_impl<non_fusion_tag>
|
||||||
{
|
{
|
||||||
template<typename T>
|
template <typename T>
|
||||||
struct apply : mpl::false_ {};
|
struct apply : mpl::false_ {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
|
// Special tags:
|
||||||
|
struct sequence_facade_tag;
|
||||||
struct array_tag; // boost::array tag
|
struct array_tag; // boost::array tag
|
||||||
struct mpl_sequence_tag; // mpl sequence tag
|
struct mpl_sequence_tag; // mpl sequence tag
|
||||||
struct std_pair_tag; // std::pair tag
|
struct std_pair_tag; // std::pair tag
|
||||||
@ -22,12 +24,19 @@ namespace boost { namespace fusion
|
|||||||
template<typename Tag>
|
template<typename Tag>
|
||||||
struct is_view_impl
|
struct is_view_impl
|
||||||
{
|
{
|
||||||
template<typename T>
|
template <typename T>
|
||||||
struct apply
|
struct apply
|
||||||
: detail::fusion_is_view<T>
|
: detail::fusion_is_view<T>
|
||||||
{};
|
{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct is_view_impl<sequence_facade_tag>
|
||||||
|
{
|
||||||
|
template <typename Sequence>
|
||||||
|
struct apply : Sequence::is_view {};
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct is_view_impl<array_tag>;
|
struct is_view_impl<array_tag>;
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
|
#include <boost/fusion/support/detail/is_mpl_sequence.hpp>
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
|
#include <boost/mpl/bool.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@ -24,7 +25,7 @@ namespace boost
|
|||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
struct non_fusion_tag;
|
struct non_fusion_tag;
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
|
BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag)
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2001-2006 Joel de Guzman
|
|
||||||
|
|
||||||
Use, modification and distribution is subject to 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(FUSION_TAGS_07212005_1031)
|
|
||||||
#define FUSION_TAGS_07212005_1031
|
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
|
||||||
{
|
|
||||||
// Iterator Classification
|
|
||||||
struct incrementable_traversal_tag {};
|
|
||||||
|
|
||||||
struct single_pass_traversal_tag
|
|
||||||
: incrementable_traversal_tag {};
|
|
||||||
|
|
||||||
struct forward_traversal_tag
|
|
||||||
: single_pass_traversal_tag {};
|
|
||||||
|
|
||||||
struct bidirectional_traversal_tag
|
|
||||||
: forward_traversal_tag {};
|
|
||||||
|
|
||||||
struct random_access_traversal_tag
|
|
||||||
: bidirectional_traversal_tag {};
|
|
||||||
|
|
||||||
// Sequence Classification
|
|
||||||
struct incrementable_sequence_tag {};
|
|
||||||
|
|
||||||
struct single_pass_sequence_tag
|
|
||||||
: incrementable_sequence_tag {};
|
|
||||||
|
|
||||||
struct forward_sequence_tag
|
|
||||||
: single_pass_sequence_tag {};
|
|
||||||
|
|
||||||
struct bidirectional_sequence_tag
|
|
||||||
: forward_sequence_tag {};
|
|
||||||
|
|
||||||
struct random_access_sequence_tag
|
|
||||||
: bidirectional_sequence_tag {};
|
|
||||||
|
|
||||||
struct associative_sequence_tag // $$$ this is no longer true $$$
|
|
||||||
: forward_sequence_tag {};
|
|
||||||
}}
|
|
||||||
|
|
||||||
#endif
|
|
Reference in New Issue
Block a user