forked from boostorg/fusion
Merge with the offending files removed.
[SVN r39995]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_BOOST_TUPLE_ITERATOR_09262006_1851)
|
||||
@@ -13,12 +13,31 @@
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct forward_traversal_tag;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
struct boost_tuple_is_empty : mpl::false_ {};
|
||||
|
||||
template <>
|
||||
struct boost_tuple_is_empty<tuples::null_type> : mpl::true_ {};
|
||||
|
||||
template <>
|
||||
struct boost_tuple_is_empty<tuples::null_type const> : mpl::true_ {};
|
||||
|
||||
template <>
|
||||
struct boost_tuple_is_empty<tuples::tuple<> > : mpl::true_ {};
|
||||
|
||||
template <>
|
||||
struct boost_tuple_is_empty<tuples::tuple<> const> : mpl::true_ {};
|
||||
}
|
||||
|
||||
template <typename Cons = tuples::null_type>
|
||||
struct boost_tuple_iterator
|
||||
: iterator_facade<boost_tuple_iterator<Cons>, forward_traversal_tag>
|
||||
@@ -36,13 +55,13 @@ namespace boost { namespace fusion
|
||||
struct deref
|
||||
{
|
||||
typedef typename value_of<Iterator>::type element;
|
||||
|
||||
typedef typename
|
||||
|
||||
typedef typename
|
||||
mpl::if_<
|
||||
is_const<typename Iterator::cons_type>
|
||||
, typename tuples::access_traits<element>::const_type
|
||||
, typename tuples::access_traits<element>::non_const_type
|
||||
>::type
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
@@ -74,9 +93,27 @@ namespace boost { namespace fusion
|
||||
};
|
||||
};
|
||||
|
||||
template <typename Null>
|
||||
struct boost_tuple_null_iterator
|
||||
: iterator_facade<boost_tuple_iterator<Null>, forward_traversal_tag>
|
||||
{
|
||||
typedef Null cons_type;
|
||||
|
||||
template <typename I1, typename I2>
|
||||
struct equal_to
|
||||
: mpl::or_<
|
||||
is_same<I1, I2>
|
||||
, mpl::and_<
|
||||
detail::boost_tuple_is_empty<typename I1::cons_type>
|
||||
, detail::boost_tuple_is_empty<typename I2::cons_type>
|
||||
>
|
||||
>
|
||||
{};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct boost_tuple_iterator<tuples::null_type>
|
||||
: iterator_facade<boost_tuple_iterator<tuples::null_type>, forward_traversal_tag>
|
||||
: boost_tuple_null_iterator<tuples::null_type>
|
||||
{
|
||||
template <typename Cons>
|
||||
explicit boost_tuple_iterator(Cons const&) {}
|
||||
@@ -84,7 +121,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <>
|
||||
struct boost_tuple_iterator<tuples::null_type const>
|
||||
: iterator_facade<boost_tuple_iterator<tuples::null_type const>, forward_traversal_tag>
|
||||
: boost_tuple_null_iterator<tuples::null_type const>
|
||||
{
|
||||
template <typename Cons>
|
||||
explicit boost_tuple_iterator(Cons const&) {}
|
||||
@@ -92,7 +129,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <>
|
||||
struct boost_tuple_iterator<tuples::tuple<> >
|
||||
: iterator_facade<boost_tuple_iterator<tuples::tuple<> >, forward_traversal_tag>
|
||||
: boost_tuple_null_iterator<tuples::tuple<> >
|
||||
{
|
||||
template <typename Cons>
|
||||
explicit boost_tuple_iterator(Cons const&) {}
|
||||
@@ -100,7 +137,7 @@ namespace boost { namespace fusion
|
||||
|
||||
template <>
|
||||
struct boost_tuple_iterator<tuples::tuple<> const>
|
||||
: iterator_facade<boost_tuple_iterator<tuples::tuple<> const>, forward_traversal_tag>
|
||||
: boost_tuple_null_iterator<tuples::tuple<> const>
|
||||
{
|
||||
template <typename Cons>
|
||||
explicit boost_tuple_iterator(Cons const&) {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/fusion/sequence/container/map/map_fwd.hpp>
|
||||
#include <boost/fusion/sequence/container/map/map.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int size>
|
||||
struct as_map;
|
||||
|
||||
|
||||
template <>
|
||||
struct as_map<0>
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef map<> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator)
|
||||
@@ -84,7 +84,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
||||
typedef map<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator const& i0)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/fusion/sequence/container/set/set_fwd.hpp>
|
||||
#include <boost/fusion/sequence/container/set/set.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int size>
|
||||
struct as_set;
|
||||
|
||||
|
||||
template <>
|
||||
struct as_set<0>
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef set<> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator)
|
||||
@@ -84,7 +84,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
||||
typedef set<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator const& i0)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/dec.hpp>
|
||||
#include <boost/fusion/sequence/container/vector/vector_fwd.hpp>
|
||||
#include <boost/fusion/sequence/container/vector/vector.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
@@ -24,7 +24,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <int size>
|
||||
struct as_vector;
|
||||
|
||||
|
||||
template <>
|
||||
struct as_vector<0>
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef vector<> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator)
|
||||
@@ -84,7 +84,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
|
||||
typedef vector<BOOST_PP_ENUM_PARAMS(N, T)> type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Iterator>
|
||||
static typename apply<Iterator>::type
|
||||
call(Iterator const& i0)
|
||||
|
||||
Reference in New Issue
Block a user