Merge upstream branch 'develop' into pr/zip_iterator/fusionize

Signed-off-by: Kohei Takahashi <flast@flast.jp>
This commit is contained in:
Kohei Takahashi
2014-07-12 15:57:03 +09:00
30 changed files with 536 additions and 370 deletions

View File

@ -14,6 +14,7 @@
#include <iterator> #include <iterator>
namespace boost { namespace boost {
namespace iterators {
template <class UnaryFunction> template <class UnaryFunction>
class function_output_iterator { class function_output_iterator {
@ -51,6 +52,11 @@ namespace boost {
return function_output_iterator<UnaryFunction>(f); return function_output_iterator<UnaryFunction>(f);
} }
} // namespace iterators
using iterators::function_output_iterator;
using iterators::make_function_output_iterator;
} // namespace boost } // namespace boost
#endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP #endif // BOOST_FUNCTION_OUTPUT_ITERATOR_HPP

View File

@ -17,6 +17,7 @@
#include <boost/ref.hpp> #include <boost/ref.hpp>
namespace boost { namespace boost {
namespace iterators {
template<class Generator> template<class Generator>
class generator_iterator class generator_iterator
@ -73,8 +74,12 @@ make_generator_iterator(Generator & gen)
return result_t(&gen); return result_t(&gen);
} }
} // namespace iterators
using iterators::generator_iterator;
using iterators::generator_iterator_generator;
using iterators::make_generator_iterator;
} // namespace boost } // namespace boost
#endif // BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP #endif // BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP

View File

@ -13,6 +13,7 @@
# include <boost/mpl/eval_if.hpp> # include <boost/mpl/eval_if.hpp>
namespace boost { namespace boost {
namespace iterators {
template < template <
class Incrementable class Incrementable
@ -52,7 +53,7 @@ namespace detail
template <class T> template <class T>
struct is_numeric struct is_numeric
: mpl::bool_<(::boost::detail::is_numeric_impl<T>::value)> : mpl::bool_<(::boost::iterators::detail::is_numeric_impl<T>::value)>
{}; {};
# if defined(BOOST_HAS_LONG_LONG) # if defined(BOOST_HAS_LONG_LONG)
@ -136,7 +137,7 @@ namespace detail
{ {
static Difference distance(Incrementable1 x, Incrementable2 y) static Difference distance(Incrementable1 x, Incrementable2 y)
{ {
return numeric_distance(x, y); return boost::detail::numeric_distance(x, y);
} }
}; };
} }
@ -209,7 +210,11 @@ make_counting_iterator(Incrementable x)
return result_t(x); return result_t(x);
} }
} // namespace iterators
} // namespace boost::iterator using iterators::counting_iterator;
using iterators::make_counting_iterator;
} // namespace boost
#endif // COUNTING_ITERATOR_DWA200348_HPP #endif // COUNTING_ITERATOR_DWA200348_HPP

View File

@ -4,7 +4,9 @@
#ifndef ANY_CONVERSION_EATER_DWA20031117_HPP #ifndef ANY_CONVERSION_EATER_DWA20031117_HPP
# define ANY_CONVERSION_EATER_DWA20031117_HPP # define ANY_CONVERSION_EATER_DWA20031117_HPP
namespace boost { namespace detail { namespace boost {
namespace iterators {
namespace detail {
// This type can be used in traits to "eat" up the one user-defined // This type can be used in traits to "eat" up the one user-defined
// implicit conversion allowed. // implicit conversion allowed.
@ -14,6 +16,6 @@ struct any_conversion_eater
any_conversion_eater(T const&); any_conversion_eater(T const&);
}; };
}} // namespace boost::detail }}} // namespace boost::iterators::detail
#endif // ANY_CONVERSION_EATER_DWA20031117_HPP #endif // ANY_CONVERSION_EATER_DWA20031117_HPP

View File

@ -30,10 +30,13 @@
// iterator_category deduction for iterator_facade // iterator_category deduction for iterator_facade
// //
// forward declaration namespace boost {
namespace boost { struct use_default; } namespace iterators {
namespace boost { namespace detail { // forward declaration
struct use_default;
namespace detail {
struct input_output_iterator_tag struct input_output_iterator_tag
: std::input_iterator_tag : std::input_iterator_tag
@ -183,7 +186,7 @@ struct facade_iterator_category
{ {
}; };
}} // namespace boost::detail }}} // namespace boost::iterators::detail
# include <boost/iterator/detail/config_undef.hpp> # include <boost/iterator/detail/config_undef.hpp>

View File

@ -9,7 +9,9 @@
# include <boost/mpl/aux_/lambda_support.hpp> # include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace detail { namespace boost {
namespace iterators {
namespace detail {
// //
// Returns the minimum category type or error_type // Returns the minimum category type or error_type
// if T1 and T2 are unrelated. // if T1 and T2 are unrelated.
@ -87,6 +89,15 @@ struct minimum_category<mpl::_1,mpl::_2>
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2))
}; };
}} // namespace boost::detail } // namespace detail
} // namespace iterators
// This import below is for backward compatibility with boost/token_iterator.hpp.
// It should be removed as soon as that header is fixed.
namespace detail {
using iterators::detail::minimum_category;
} // namespace detail
} // namespace boost
#endif // MINIMUM_CATEGORY_DWA20031119_HPP #endif // MINIMUM_CATEGORY_DWA20031119_HPP

View File

@ -14,8 +14,9 @@
#include <boost/type_traits/is_class.hpp> #include <boost/type_traits/is_class.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
namespace boost namespace boost {
{ namespace iterators {
template <class Predicate, class Iterator> template <class Predicate, class Iterator>
class filter_iterator; class filter_iterator;
@ -108,14 +109,14 @@ namespace boost
}; };
template <class Predicate, class Iterator> template <class Predicate, class Iterator>
filter_iterator<Predicate,Iterator> inline filter_iterator<Predicate,Iterator>
make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator()) make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator())
{ {
return filter_iterator<Predicate,Iterator>(f,x,end); return filter_iterator<Predicate,Iterator>(f,x,end);
} }
template <class Predicate, class Iterator> template <class Predicate, class Iterator>
filter_iterator<Predicate,Iterator> inline filter_iterator<Predicate,Iterator>
make_filter_iterator( make_filter_iterator(
typename iterators::enable_if< typename iterators::enable_if<
is_class<Predicate> is_class<Predicate>
@ -126,6 +127,11 @@ namespace boost
return filter_iterator<Predicate,Iterator>(x,end); return filter_iterator<Predicate,Iterator>(x,end);
} }
} // namespace iterators
using iterators::filter_iterator;
using iterators::make_filter_iterator;
} // namespace boost } // namespace boost
#endif // BOOST_FILTER_ITERATOR_23022003THW_HPP #endif // BOOST_FILTER_ITERATOR_23022003THW_HPP

View File

@ -20,6 +20,8 @@
namespace boost { namespace boost {
namespace iterators {
namespace impl { namespace impl {
template <class Function, class Input> template <class Function, class Input>
@ -154,7 +156,14 @@ namespace boost {
bool operator==(infinite &) const { return false; }; bool operator==(infinite &) const { return false; };
bool operator==(infinite const &) const { return false; }; bool operator==(infinite const &) const { return false; };
}; };
}
} // namespace iterators
using iterators::function_input_iterator;
using iterators::make_function_input_iterator;
using iterators::infinite;
} // namespace boost
#endif #endif

View File

@ -34,8 +34,9 @@
#include <boost/iterator/detail/config_def.hpp> // must be last #include #include <boost/iterator/detail/config_def.hpp> // must be last #include
namespace boost namespace boost {
{ namespace iterators {
template <class Iter, class Value, class Category, class Reference, class Difference> template <class Iter, class Value, class Category, class Reference, class Difference>
class indirect_iterator; class indirect_iterator;
@ -44,7 +45,7 @@ namespace boost
template <class Iter, class Value, class Category, class Reference, class Difference> template <class Iter, class Value, class Category, class Reference, class Difference>
struct indirect_base struct indirect_base
{ {
typedef typename iterator_traits<Iter>::value_type dereferenceable; typedef typename boost::detail::iterator_traits<Iter>::value_type dereferenceable;
typedef iterator_adaptor< typedef iterator_adaptor<
indirect_iterator<Iter, Value, Category, Reference, Difference> indirect_iterator<Iter, Value, Category, Reference, Difference>
@ -132,6 +133,11 @@ namespace boost
return indirect_iterator<Iter, Traits>(x); return indirect_iterator<Iter, Traits>(x);
} }
} // namespace iterators
using iterators::indirect_iterator;
using iterators::make_indirect_iterator;
} // namespace boost } // namespace boost
#include <boost/iterator/detail/config_undef.hpp> #include <boost/iterator/detail/config_undef.hpp>

View File

@ -14,8 +14,8 @@
# include <boost/iterator/detail/config_def.hpp> // must appear last # include <boost/iterator/detail/config_def.hpp> // must appear last
namespace boost namespace boost {
{ namespace iterators {
// //
// Meta function that determines whether two // Meta function that determines whether two
@ -43,6 +43,10 @@ namespace boost
{ {
}; };
} // namespace iterators
using iterators::is_interoperable;
} // namespace boost } // namespace boost
# include <boost/iterator/detail/config_undef.hpp> # include <boost/iterator/detail/config_undef.hpp>

View File

@ -19,6 +19,8 @@
namespace boost { namespace boost {
namespace iterators {
namespace detail namespace detail
{ {
#ifndef BOOST_NO_LVALUE_RETURN_DETECTION #ifndef BOOST_NO_LVALUE_RETURN_DETECTION
@ -135,10 +137,15 @@ namespace detail
// Define the trait with full mpl lambda capability and various broken // Define the trait with full mpl lambda capability and various broken
// compiler workarounds // compiler workarounds
BOOST_TT_AUX_BOOL_TRAIT_DEF1( BOOST_TT_AUX_BOOL_TRAIT_DEF1(
is_lvalue_iterator,T,::boost::detail::is_readable_lvalue_iterator_impl<T>::value) is_lvalue_iterator,T,::boost::iterators::detail::is_readable_lvalue_iterator_impl<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_DEF1( BOOST_TT_AUX_BOOL_TRAIT_DEF1(
is_non_const_lvalue_iterator,T,::boost::detail::is_non_const_lvalue_iterator_impl<T>::value) is_non_const_lvalue_iterator,T,::boost::iterators::detail::is_non_const_lvalue_iterator_impl<T>::value)
} // namespace iterators
using iterators::is_lvalue_iterator;
using iterators::is_non_const_lvalue_iterator;
} // namespace boost } // namespace boost

View File

@ -17,6 +17,8 @@
namespace boost { namespace boost {
namespace iterators {
namespace detail namespace detail
{ {
// Guts of is_readable_iterator. Value is the iterator's value_type // Guts of is_readable_iterator. Value is the iterator's value_type
@ -97,7 +99,11 @@ namespace detail
// Define the trait with full mpl lambda capability and various broken // Define the trait with full mpl lambda capability and various broken
// compiler workarounds // compiler workarounds
BOOST_TT_AUX_BOOL_TRAIT_DEF1( BOOST_TT_AUX_BOOL_TRAIT_DEF1(
is_readable_iterator,T,::boost::detail::is_readable_iterator_impl2<T>::value) is_readable_iterator,T,::boost::iterators::detail::is_readable_iterator_impl2<T>::value)
} // namespace iterators
using iterators::is_readable_iterator;
} // namespace boost } // namespace boost

View File

@ -31,21 +31,26 @@
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
namespace boost namespace boost {
{ namespace iterators {
// Used as a default template argument internally, merely to // Used as a default template argument internally, merely to
// indicate "use the default", this can also be passed by users // indicate "use the default", this can also be passed by users
// explicitly in order to specify that the default should be used. // explicitly in order to specify that the default should be used.
struct use_default; struct use_default;
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace iterators
// the incompleteness of use_default causes massive problems for
// is_convertible (naturally). This workaround is fortunately not using iterators::use_default;
// needed for vc6/vc7.
template<class To> // the incompleteness of use_default causes massive problems for
struct is_convertible<use_default,To> // is_convertible (naturally). This workaround is fortunately not
: mpl::false_ {}; // needed for vc6/vc7.
# endif template<class To>
struct is_convertible<use_default,To>
: mpl::false_ {};
namespace iterators {
namespace detail namespace detail
{ {
@ -104,7 +109,7 @@ namespace boost
template <class From, class To> template <class From, class To>
struct enable_if_convertible struct enable_if_convertible
{ {
typedef boost::detail::enable_type type; typedef boost::iterators::detail::enable_type type;
}; };
# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) # elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292))
@ -118,7 +123,7 @@ namespace boost
is_same<From,To> is_same<From,To>
, is_convertible<From, To> , is_convertible<From, To>
> >
, boost::detail::enable_type , boost::iterators::detail::enable_type
> >
{}; {};
@ -128,7 +133,7 @@ namespace boost
struct enable_if_convertible struct enable_if_convertible
: iterators::enable_if< : iterators::enable_if<
is_convertible<From, To> is_convertible<From, To>
, boost::detail::enable_type , boost::iterators::detail::enable_type
> >
{}; {};
@ -167,7 +172,7 @@ namespace boost
Derived Derived
# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY # ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
, typename boost::detail::ia_dflt_help< , typename boost::iterators::detail::ia_dflt_help<
Value Value
, mpl::eval_if< , mpl::eval_if<
is_same<Reference,use_default> is_same<Reference,use_default>
@ -176,17 +181,17 @@ namespace boost
> >
>::type >::type
# else # else
, typename boost::detail::ia_dflt_help< , typename boost::iterators::detail::ia_dflt_help<
Value, iterator_value<Base> Value, iterator_value<Base>
>::type >::type
# endif # endif
, typename boost::detail::ia_dflt_help< , typename boost::iterators::detail::ia_dflt_help<
Traversal Traversal
, iterator_traversal<Base> , iterator_traversal<Base>
>::type >::type
, typename boost::detail::ia_dflt_help< , typename boost::iterators::detail::ia_dflt_help<
Reference Reference
, mpl::eval_if< , mpl::eval_if<
is_same<Value,use_default> is_same<Value,use_default>
@ -195,7 +200,7 @@ namespace boost
> >
>::type >::type
, typename boost::detail::ia_dflt_help< , typename boost::iterators::detail::ia_dflt_help<
Difference, iterator_difference<Base> Difference, iterator_difference<Base>
>::type >::type
> >
@ -244,14 +249,14 @@ namespace boost
, class Difference = use_default , class Difference = use_default
> >
class iterator_adaptor class iterator_adaptor
: public boost::detail::iterator_adaptor_base< : public boost::iterators::detail::iterator_adaptor_base<
Derived, Base, Value, Traversal, Reference, Difference Derived, Base, Value, Traversal, Reference, Difference
>::type >::type
{ {
friend class iterator_core_access; friend class iterator_core_access;
protected: protected:
typedef typename boost::detail::iterator_adaptor_base< typedef typename boost::iterators::detail::iterator_adaptor_base<
Derived, Base, Value, Traversal, Reference, Difference Derived, Base, Value, Traversal, Reference, Difference
>::type super_t; >::type super_t;
public: public:
@ -307,7 +312,7 @@ namespace boost
>::type my_traversal; >::type my_traversal;
# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ # define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \
boost::detail::iterator_adaptor_assert_traversal<my_traversal, cat>(); boost::iterators::detail::iterator_adaptor_assert_traversal<my_traversal, cat>();
void advance(typename super_t::difference_type n) void advance(typename super_t::difference_type n)
{ {
@ -343,6 +348,11 @@ namespace boost
Base m_iterator; Base m_iterator;
}; };
} // namespace iterators
using iterators::iterator_adaptor;
using iterators::enable_if_convertible;
} // namespace boost } // namespace boost
#include <boost/iterator/detail/config_undef.hpp> #include <boost/iterator/detail/config_undef.hpp>

View File

@ -31,6 +31,7 @@
#include <cstddef> #include <cstddef>
namespace boost { namespace boost {
namespace iterators {
template <class Value, class AccessCategory> template <class Value, class AccessCategory>
struct access_archetype; struct access_archetype;
@ -38,7 +39,7 @@ struct access_archetype;
template <class Derived, class Value, class AccessCategory, class TraversalCategory> template <class Derived, class Value, class AccessCategory, class TraversalCategory>
struct traversal_archetype; struct traversal_archetype;
namespace iterator_archetypes namespace archetypes
{ {
enum { enum {
readable_iterator_bit = 1 readable_iterator_bit = 1
@ -121,15 +122,15 @@ namespace detail
: mpl::eval_if< : mpl::eval_if<
is_convertible<TraversalCategory, random_access_traversal_tag> is_convertible<TraversalCategory, random_access_traversal_tag>
, mpl::eval_if< , mpl::eval_if<
iterator_archetypes::has_access< archetypes::has_access<
AccessCategory AccessCategory
, iterator_archetypes::writable_iterator_t , archetypes::writable_iterator_t
> >
, mpl::identity<writable_operator_brackets<Value> > , mpl::identity<writable_operator_brackets<Value> >
, mpl::if_< , mpl::if_<
iterator_archetypes::has_access< archetypes::has_access<
AccessCategory AccessCategory
, iterator_archetypes::readable_iterator_t , archetypes::readable_iterator_t
> >
, readable_operator_brackets<Value> , readable_operator_brackets<Value>
, no_operator_brackets , no_operator_brackets
@ -306,7 +307,7 @@ struct iterator_access_archetype
template <> template <>
struct iterator_access_archetype_impl< struct iterator_access_archetype_impl<
iterator_archetypes::readable_iterator_t archetypes::readable_iterator_t
> >
{ {
template <class Value> template <class Value>
@ -324,7 +325,7 @@ struct iterator_access_archetype_impl<
template <> template <>
struct iterator_access_archetype_impl< struct iterator_access_archetype_impl<
iterator_archetypes::writable_iterator_t archetypes::writable_iterator_t
> >
{ {
template <class Value> template <class Value>
@ -341,13 +342,13 @@ struct iterator_access_archetype_impl<
template <> template <>
struct iterator_access_archetype_impl< struct iterator_access_archetype_impl<
iterator_archetypes::readable_writable_iterator_t archetypes::readable_writable_iterator_t
> >
{ {
template <class Value> template <class Value>
struct archetype struct archetype
: public virtual iterator_access_archetype< : public virtual iterator_access_archetype<
Value, iterator_archetypes::readable_iterator_t Value, archetypes::readable_iterator_t
> >
{ {
typedef detail::read_write_proxy<Value> reference; typedef detail::read_write_proxy<Value> reference;
@ -357,12 +358,12 @@ struct iterator_access_archetype_impl<
}; };
template <> template <>
struct iterator_access_archetype_impl<iterator_archetypes::readable_lvalue_iterator_t> struct iterator_access_archetype_impl<archetypes::readable_lvalue_iterator_t>
{ {
template <class Value> template <class Value>
struct archetype struct archetype
: public virtual iterator_access_archetype< : public virtual iterator_access_archetype<
Value, iterator_archetypes::readable_iterator_t Value, archetypes::readable_iterator_t
> >
{ {
typedef Value& reference; typedef Value& reference;
@ -373,12 +374,12 @@ struct iterator_access_archetype_impl<iterator_archetypes::readable_lvalue_itera
}; };
template <> template <>
struct iterator_access_archetype_impl<iterator_archetypes::writable_lvalue_iterator_t> struct iterator_access_archetype_impl<archetypes::writable_lvalue_iterator_t>
{ {
template <class Value> template <class Value>
struct archetype struct archetype
: public virtual iterator_access_archetype< : public virtual iterator_access_archetype<
Value, iterator_archetypes::readable_lvalue_iterator_t Value, archetypes::readable_lvalue_iterator_t
> >
{ {
BOOST_STATIC_ASSERT((!is_const<Value>::value)); BOOST_STATIC_ASSERT((!is_const<Value>::value));
@ -416,8 +417,8 @@ namespace detail
typedef typename detail::facade_iterator_category< typedef typename detail::facade_iterator_category<
TraversalCategory TraversalCategory
, typename mpl::eval_if< , typename mpl::eval_if<
iterator_archetypes::has_access< archetypes::has_access<
AccessCategory, iterator_archetypes::writable_iterator_t AccessCategory, archetypes::writable_iterator_t
> >
, remove_const<Value> , remove_const<Value>
, add_const<Value> , add_const<Value>
@ -492,7 +493,17 @@ struct iterator_archetype
# endif # endif
}; };
} // namespace iterators
// Backward compatibility names
namespace iterator_archetypes = iterators::archetypes;
using iterators::access_archetype;
using iterators::traversal_archetype;
using iterators::iterator_archetype;
using iterators::undefined;
using iterators::iterator_access_archetype_impl;
using iterators::traversal_archetype_base;
} // namespace boost } // namespace boost
#endif // BOOST_ITERATOR_ARCHETYPES_HPP #endif // BOOST_ITERATOR_ARCHETYPES_HPP

View File

@ -22,6 +22,7 @@
# include <boost/static_assert.hpp> # include <boost/static_assert.hpp>
namespace boost { namespace boost {
namespace iterators {
// //
// Traversal Categories // Traversal Categories
@ -134,7 +135,7 @@ struct iterator_category_to_traversal
: mpl::eval_if< // if already convertible to a traversal tag, we're done. : mpl::eval_if< // if already convertible to a traversal tag, we're done.
is_convertible<Cat,incrementable_traversal_tag> is_convertible<Cat,incrementable_traversal_tag>
, mpl::identity<Cat> , mpl::identity<Cat>
, boost::detail::old_category_to_traversal<Cat> , boost::iterators::detail::old_category_to_traversal<Cat>
> >
{}; {};
@ -165,6 +166,17 @@ struct iterator_traversal<mpl::_>
{}; {};
# endif # endif
} // namespace iterators
using iterators::no_traversal_tag;
using iterators::incrementable_traversal_tag;
using iterators::single_pass_traversal_tag;
using iterators::forward_traversal_tag;
using iterators::bidirectional_traversal_tag;
using iterators::random_access_traversal_tag;
using iterators::iterator_category_to_traversal;
using iterators::iterator_traversal;
} // namespace boost } // namespace boost
#include <boost/iterator/detail/config_undef.hpp> #include <boost/iterator/detail/config_undef.hpp>

View File

@ -248,13 +248,13 @@ namespace boost_concepts
BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator))
{ {
private: private:
typedef typename boost::detail::pure_traversal_tag< typedef typename boost::iterators::detail::pure_traversal_tag<
typename boost::iterator_traversal< typename boost::iterator_traversal<
Iterator Iterator
>::type >::type
>::type traversal_category; >::type traversal_category;
typedef typename boost::detail::pure_traversal_tag< typedef typename boost::iterators::detail::pure_traversal_tag<
typename boost::iterator_traversal< typename boost::iterator_traversal<
ConstIterator ConstIterator
>::type >::type

View File

@ -38,8 +38,9 @@
#include <boost/iterator/detail/config_def.hpp> // this goes last #include <boost/iterator/detail/config_def.hpp> // this goes last
namespace boost namespace boost {
{ namespace iterators {
// This forward declaration is required for the friend declaration // This forward declaration is required for the friend declaration
// in iterator_core_access // in iterator_core_access
template <class I, class V, class TC, class R, class D> class iterator_facade; template <class I, class V, class TC, class R, class D> class iterator_facade;
@ -118,7 +119,7 @@ namespace boost
// Not the real associated pointer type // Not the real associated pointer type
typedef typename mpl::eval_if< typedef typename mpl::eval_if<
boost::detail::iterator_writability_disabled<ValueParam,Reference> boost::iterators::detail::iterator_writability_disabled<ValueParam,Reference>
, add_pointer<const value_type> , add_pointer<const value_type>
, add_pointer<value_type> , add_pointer<value_type>
>::type pointer; >::type pointer;
@ -462,15 +463,15 @@ namespace boost
# endif # endif
# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ # define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::detail::enable_if_interoperable) BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable)
# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \ # define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \
BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::detail::enable_if_interoperable_and_random_access_traversal) BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal)
# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ # define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
template <class Derived, class V, class TC, class R, class D> \ template <class Derived, class V, class TC, class R, class D> \
prefix typename boost::iterators::enable_if< \ prefix typename boost::iterators::enable_if< \
boost::detail::is_traversal_at_least< TC, boost::random_access_traversal_tag >, \ boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \
Derived \ Derived \
>::type operator+ args >::type operator+ args
@ -496,7 +497,7 @@ namespace boost
friend class detail::iterator_facade_base; friend class detail::iterator_facade_base;
# define BOOST_ITERATOR_FACADE_RELATION(op) \ # define BOOST_ITERATOR_FACADE_RELATION(op) \
BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::detail::always_bool2); BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2);
BOOST_ITERATOR_FACADE_RELATION(==) BOOST_ITERATOR_FACADE_RELATION(==)
BOOST_ITERATOR_FACADE_RELATION(!=) BOOST_ITERATOR_FACADE_RELATION(!=)
@ -504,7 +505,7 @@ namespace boost
# undef BOOST_ITERATOR_FACADE_RELATION # undef BOOST_ITERATOR_FACADE_RELATION
# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \ # define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \
BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::detail::always_bool2); BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2);
BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<) BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<)
BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>) BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>)
@ -514,7 +515,7 @@ namespace boost
# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION # undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION
BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD( BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(
friend, -, boost::detail::choose_difference_type) friend, -, boost::iterators::detail::choose_difference_type)
; ;
BOOST_ITERATOR_FACADE_PLUS_HEAD( BOOST_ITERATOR_FACADE_PLUS_HEAD(
@ -614,18 +615,18 @@ namespace boost
> >
class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false >
# ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE # ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
: public boost::detail::iterator_facade_types< : public boost::iterators::detail::iterator_facade_types<
Value, CategoryOrTraversal, Reference, Difference Value, CategoryOrTraversal, Reference, Difference
>::base >::base
# undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE # undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE
# endif # endif
{ {
private: private:
typedef boost::detail::iterator_facade_types< typedef boost::iterators::detail::iterator_facade_types<
Value, CategoryOrTraversal, Reference, Difference Value, CategoryOrTraversal, Reference, Difference
> associated_types; > associated_types;
typedef boost::detail::operator_arrow_dispatch< typedef boost::iterators::detail::operator_arrow_dispatch<
Reference Reference
, typename associated_types::pointer , typename associated_types::pointer
> operator_arrow_dispatch_; > operator_arrow_dispatch_;
@ -716,12 +717,12 @@ namespace boost
typedef typename base_type::difference_type difference_type; typedef typename base_type::difference_type difference_type;
public: public:
typename boost::detail::operator_brackets_result<Derived, Value, reference>::type typename boost::iterators::detail::operator_brackets_result<Derived, Value, reference>::type
operator[](difference_type n) const operator[](difference_type n) const
{ {
typedef boost::detail::use_operator_brackets_proxy<Value, Reference> use_proxy; typedef boost::iterators::detail::use_operator_brackets_proxy<Value, Reference> use_proxy;
return boost::detail::make_operator_brackets_result<Derived>( return boost::iterators::detail::make_operator_brackets_result<Derived>(
this->derived() + n this->derived() + n
, use_proxy() , use_proxy()
); );
@ -776,13 +777,13 @@ namespace boost
}; };
template <class I, class V, class TC, class R, class D> template <class I, class V, class TC, class R, class D>
inline typename boost::detail::postfix_increment_result<I,V,R,TC>::type inline typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
operator++( operator++(
iterator_facade<I,V,TC,R,D>& i iterator_facade<I,V,TC,R,D>& i
, int , int
) )
{ {
typename boost::detail::postfix_increment_result<I,V,R,TC>::type typename boost::iterators::detail::postfix_increment_result<I,V,R,TC>::type
tmp(*static_cast<I*>(&i)); tmp(*static_cast<I*>(&i));
++i; ++i;
@ -881,7 +882,7 @@ namespace boost
# define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ # define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \
BOOST_ITERATOR_FACADE_INTEROP( \ BOOST_ITERATOR_FACADE_INTEROP( \
op \ op \
, boost::detail::always_bool2 \ , boost::iterators::detail::always_bool2 \
, return_prefix \ , return_prefix \
, base_op \ , base_op \
) )
@ -898,8 +899,8 @@ namespace boost
/* For those compilers that do not support enable_if */ \ /* For those compilers that do not support enable_if */ \
BOOST_STATIC_ASSERT(( \ BOOST_STATIC_ASSERT(( \
is_interoperable< Derived1, Derived2 >::value && \ is_interoperable< Derived1, Derived2 >::value && \
boost::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \ boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \
boost::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \ boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \
)); \ )); \
return_prefix iterator_core_access::base_op( \ return_prefix iterator_core_access::base_op( \
*static_cast<Derived1 const*>(&lhs) \ *static_cast<Derived1 const*>(&lhs) \
@ -911,7 +912,7 @@ namespace boost
# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \ # define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \
BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \ BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \
op \ op \
, boost::detail::always_bool2 \ , boost::iterators::detail::always_bool2 \
, return_prefix \ , return_prefix \
, base_op \ , base_op \
) )
@ -926,7 +927,7 @@ namespace boost
// operator- requires an additional part in the static assertion // operator- requires an additional part in the static assertion
BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(
- -
, boost::detail::choose_difference_type , boost::iterators::detail::choose_difference_type
, return , return
, distance_from , distance_from
) )
@ -941,15 +942,15 @@ namespace boost
return tmp += n; \ return tmp += n; \
} }
BOOST_ITERATOR_FACADE_PLUS(( BOOST_ITERATOR_FACADE_PLUS((
iterator_facade<Derived, V, TC, R, D> const& i iterator_facade<Derived, V, TC, R, D> const& i
, typename Derived::difference_type n , typename Derived::difference_type n
)) ))
BOOST_ITERATOR_FACADE_PLUS(( BOOST_ITERATOR_FACADE_PLUS((
typename Derived::difference_type n typename Derived::difference_type n
, iterator_facade<Derived, V, TC, R, D> const& i , iterator_facade<Derived, V, TC, R, D> const& i
)) ))
# undef BOOST_ITERATOR_FACADE_PLUS # undef BOOST_ITERATOR_FACADE_PLUS
# undef BOOST_ITERATOR_FACADE_PLUS_HEAD # undef BOOST_ITERATOR_FACADE_PLUS_HEAD
@ -958,6 +959,11 @@ BOOST_ITERATOR_FACADE_PLUS((
# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD # undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD
# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL # undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL
} // namespace iterators
using iterators::iterator_core_access;
using iterators::iterator_facade;
} // namespace boost } // namespace boost
#include <boost/iterator/detail/config_undef.hpp> #include <boost/iterator/detail/config_undef.hpp>

View File

@ -9,6 +9,7 @@
# include <boost/detail/workaround.hpp> # include <boost/detail/workaround.hpp>
namespace boost { namespace boost {
namespace iterators {
// Macro for supporting old compilers, no longer needed but kept // Macro for supporting old compilers, no longer needed but kept
// for backwards compatibility (it was documented). // for backwards compatibility (it was documented).
@ -46,6 +47,14 @@ struct iterator_category
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type; typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
}; };
} // namespace boost::iterator } // namespace iterators
using iterators::iterator_value;
using iterators::iterator_reference;
using iterators::iterator_pointer;
using iterators::iterator_difference;
using iterators::iterator_category;
} // namespace boost
#endif // ITERATOR_TRAITS_DWA200347_HPP #endif // ITERATOR_TRAITS_DWA200347_HPP

View File

@ -13,21 +13,21 @@
#include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_adaptor.hpp>
namespace boost namespace boost {
{ namespace iterators {
template< class ElementIterator template< class ElementIterator
, class IndexIterator> , class IndexIterator>
class permutation_iterator class permutation_iterator
: public iterator_adaptor< : public iterator_adaptor<
permutation_iterator<ElementIterator, IndexIterator> permutation_iterator<ElementIterator, IndexIterator>
, IndexIterator, typename detail::iterator_traits<ElementIterator>::value_type , IndexIterator, typename boost::detail::iterator_traits<ElementIterator>::value_type
, use_default, typename detail::iterator_traits<ElementIterator>::reference> , use_default, typename boost::detail::iterator_traits<ElementIterator>::reference>
{ {
typedef iterator_adaptor< typedef iterator_adaptor<
permutation_iterator<ElementIterator, IndexIterator> permutation_iterator<ElementIterator, IndexIterator>
, IndexIterator, typename detail::iterator_traits<ElementIterator>::value_type , IndexIterator, typename boost::detail::iterator_traits<ElementIterator>::value_type
, use_default, typename detail::iterator_traits<ElementIterator>::reference> super_t; , use_default, typename boost::detail::iterator_traits<ElementIterator>::reference> super_t;
friend class iterator_core_access; friend class iterator_core_access;
@ -60,12 +60,16 @@ private:
template <class ElementIterator, class IndexIterator> template <class ElementIterator, class IndexIterator>
permutation_iterator<ElementIterator, IndexIterator> inline permutation_iterator<ElementIterator, IndexIterator>
make_permutation_iterator( ElementIterator e, IndexIterator i ) make_permutation_iterator( ElementIterator e, IndexIterator i )
{ {
return permutation_iterator<ElementIterator, IndexIterator>( e, i ); return permutation_iterator<ElementIterator, IndexIterator>( e, i );
} }
} // namespace iterators
using iterators::permutation_iterator;
using iterators::make_permutation_iterator;
} // namespace boost } // namespace boost

View File

@ -11,8 +11,8 @@
#include <boost/iterator.hpp> #include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_adaptor.hpp>
namespace boost namespace boost {
{ namespace iterators {
// //
// //
@ -59,11 +59,16 @@ namespace boost
}; };
template <class BidirectionalIterator> template <class BidirectionalIterator>
reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x) inline reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
{ {
return reverse_iterator<BidirectionalIterator>(x); return reverse_iterator<BidirectionalIterator>(x);
} }
} // namespace iterators
using iterators::reverse_iterator;
using iterators::make_reverse_iterator;
} // namespace boost } // namespace boost
#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP #endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP

View File

@ -30,8 +30,9 @@
#include <boost/iterator/detail/config_def.hpp> #include <boost/iterator/detail/config_def.hpp>
namespace boost namespace boost {
{ namespace iterators {
template <class UnaryFunction, class Iterator, class Reference = use_default, class Value = use_default> template <class UnaryFunction, class Iterator, class Reference = use_default, class Value = use_default>
class transform_iterator; class transform_iterator;
@ -72,10 +73,10 @@ namespace boost
template <class UnaryFunc, class Iterator, class Reference, class Value> template <class UnaryFunc, class Iterator, class Reference, class Value>
class transform_iterator class transform_iterator
: public boost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type : public boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
{ {
typedef typename typedef typename
boost::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type boost::iterators::detail::transform_iterator_base<UnaryFunc, Iterator, Reference, Value>::type
super_t; super_t;
friend class iterator_core_access; friend class iterator_core_access;
@ -126,7 +127,7 @@ namespace boost
}; };
template <class UnaryFunc, class Iterator> template <class UnaryFunc, class Iterator>
transform_iterator<UnaryFunc, Iterator> inline transform_iterator<UnaryFunc, Iterator>
make_transform_iterator(Iterator it, UnaryFunc fun) make_transform_iterator(Iterator it, UnaryFunc fun)
{ {
return transform_iterator<UnaryFunc, Iterator>(it, fun); return transform_iterator<UnaryFunc, Iterator>(it, fun);
@ -140,7 +141,7 @@ namespace boost
// function pointer in the iterator be 0, leading to a runtime // function pointer in the iterator be 0, leading to a runtime
// crash. // crash.
template <class UnaryFunc, class Iterator> template <class UnaryFunc, class Iterator>
typename iterators::enable_if< inline typename iterators::enable_if<
is_class<UnaryFunc> // We should probably find a cheaper test than is_class<> is_class<UnaryFunc> // We should probably find a cheaper test than is_class<>
, transform_iterator<UnaryFunc, Iterator> , transform_iterator<UnaryFunc, Iterator>
>::type >::type
@ -151,13 +152,18 @@ namespace boost
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
template <class Return, class Argument, class Iterator> template <class Return, class Argument, class Iterator>
transform_iterator< Return (*)(Argument), Iterator, Return> inline transform_iterator< Return (*)(Argument), Iterator, Return>
make_transform_iterator(Iterator it, Return (*fun)(Argument)) make_transform_iterator(Iterator it, Return (*fun)(Argument))
{ {
return transform_iterator<Return (*)(Argument), Iterator, Return>(it, fun); return transform_iterator<Return (*)(Argument), Iterator, Return>(it, fun);
} }
#endif #endif
} // namespace iterators
using iterators::transform_iterator;
using iterators::make_transform_iterator;
} // namespace boost } // namespace boost
#include <boost/iterator/detail/config_undef.hpp> #include <boost/iterator/detail/config_undef.hpp>

View File

@ -36,6 +36,7 @@
#include <boost/fusion/support/tag_of_fwd.hpp> #include <boost/fusion/support/tag_of_fwd.hpp>
namespace boost { namespace boost {
namespace iterators {
// Zip iterator forward declaration for zip_iterator_base // Zip iterator forward declaration for zip_iterator_base
template<typename IteratorTuple> template<typename IteratorTuple>
@ -357,6 +358,11 @@ namespace boost {
make_zip_iterator(IteratorTuple t) make_zip_iterator(IteratorTuple t)
{ return zip_iterator<IteratorTuple>(t); } { return zip_iterator<IteratorTuple>(t); }
} } // namespace iterators
using iterators::zip_iterator;
using iterators::make_zip_iterator;
} // namespace boost
#endif #endif

View File

@ -15,6 +15,7 @@
#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
namespace boost { namespace boost {
namespace iterators {
#endif #endif
// this should use random_access_iterator_helper but I've had // this should use random_access_iterator_helper but I've had
@ -61,13 +62,19 @@ inline int_iterator<IntT>
operator+(IntT n, int_iterator<IntT> t) { t += n; return t; } operator+(IntT n, int_iterator<IntT> t) { t += n; return t; }
#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
} /* namespace iterators */
using iterators::int_iterator;
} /* namespace boost */ } /* namespace boost */
#endif #endif
#ifdef BOOST_NO_OPERATORS_IN_NAMESPACE #ifdef BOOST_NO_OPERATORS_IN_NAMESPACE
namespace boost { namespace boost {
using ::int_iterator; using ::int_iterator;
} namespace iterators {
using ::int_iterator;
}}
#endif #endif

View File

@ -41,6 +41,7 @@ struct dummyT {
} }
namespace boost { namespace boost {
namespace iterators {
// Tests whether type Iterator satisfies the requirements for a // Tests whether type Iterator satisfies the requirements for a
// TrivialIterator. // TrivialIterator.
@ -260,6 +261,18 @@ void const_nonconst_iterator_test(Iterator i, ConstIterator j)
assert(i == k); assert(i == k);
} }
} // namespace iterators
using iterators::undefined;
using iterators::trivial_iterator_test;
using iterators::mutable_trivial_iterator_test;
using iterators::input_iterator_test;
using iterators::lvalue_test;
using iterators::forward_iterator_test;
using iterators::bidirectional_iterator_test;
using iterators::random_access_iterator_test;
using iterators::const_nonconst_iterator_test;
} // namespace boost } // namespace boost
#endif // BOOST_ITERATOR_TESTS_HPP #endif // BOOST_ITERATOR_TESTS_HPP

View File

@ -13,6 +13,7 @@
#include <utility> #include <utility>
namespace boost { namespace boost {
namespace iterators {
template <typename Container> template <typename Container>
class shared_container_iterator : public iterator_adaptor< class shared_container_iterator : public iterator_adaptor<
@ -37,7 +38,7 @@ public:
}; };
template <typename Container> template <typename Container>
shared_container_iterator<Container> inline shared_container_iterator<Container>
make_shared_container_iterator(typename Container::iterator iter, make_shared_container_iterator(typename Container::iterator iter,
boost::shared_ptr<Container> const& container) { boost::shared_ptr<Container> const& container) {
typedef shared_container_iterator<Container> iterator; typedef shared_container_iterator<Container> iterator;
@ -47,7 +48,7 @@ make_shared_container_iterator(typename Container::iterator iter,
template <typename Container> template <typename Container>
std::pair< inline std::pair<
shared_container_iterator<Container>, shared_container_iterator<Container>,
shared_container_iterator<Container> > shared_container_iterator<Container> >
make_shared_container_range(boost::shared_ptr<Container> const& container) { make_shared_container_range(boost::shared_ptr<Container> const& container) {
@ -57,6 +58,12 @@ make_shared_container_range(boost::shared_ptr<Container> const& container) {
make_shared_container_iterator(container->end(),container)); make_shared_container_iterator(container->end(),container));
} }
} // namespace iterators
using iterators::shared_container_iterator;
using iterators::make_shared_container_iterator;
using iterators::make_shared_container_range;
} // namespace boost } // namespace boost
#endif // SHARED_CONTAINER_ITERATOR_RG08102002_HPP #endif // SHARED_CONTAINER_ITERATOR_RG08102002_HPP

View File

@ -29,14 +29,14 @@ void operator_arrow_test()
template <class T, class U, class Min> template <class T, class U, class Min>
struct static_assert_min_cat struct static_assert_min_cat
: static_assert_same< : static_assert_same<
typename boost::detail::minimum_category<T,U>::type, Min typename boost::iterators::detail::minimum_category<T,U>::type, Min
> >
{}; {};
void category_test() void category_test()
{ {
using namespace boost; using namespace boost::iterators;
using namespace boost::detail; using namespace boost::iterators::detail;
BOOST_STATIC_ASSERT(( BOOST_STATIC_ASSERT((
!boost::is_convertible< !boost::is_convertible<

View File

@ -57,7 +57,7 @@
template <class It> template <class It>
struct pure_traversal struct pure_traversal
: boost::detail::pure_traversal_tag< : boost::iterators::detail::pure_traversal_tag<
typename boost::iterator_traversal<It>::type typename boost::iterator_traversal<It>::type
> >
{}; {};