From bedcfb875a713be4ccb22ace957fb62330024da6 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Mon, 8 Aug 2005 02:18:32 +0000 Subject: [PATCH] Spirit miniboost update. [SVN r30504] --- include/boost/iterator/detail/config_def.hpp | 11 ++++++++--- include/boost/iterator/filter_iterator.hpp | 4 ++-- include/boost/iterator/iterator_adaptor.hpp | 2 ++ include/boost/iterator/iterator_archetypes.hpp | 18 ++++++++++++++++-- include/boost/iterator/iterator_facade.hpp | 13 +++++++------ include/boost/iterator/zip_iterator.hpp | 1 + 6 files changed, 36 insertions(+), 13 deletions(-) diff --git a/include/boost/iterator/detail/config_def.hpp b/include/boost/iterator/detail/config_def.hpp index fcdb9d6..82b3b52 100644 --- a/include/boost/iterator/detail/config_def.hpp +++ b/include/boost/iterator/detail/config_def.hpp @@ -22,7 +22,11 @@ # define BOOST_ITERATOR_CONFIG_DEF #endif -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ +// We enable this always now. Otherwise, the simple case in +// libs/iterator/test/constant_iterator_arrow.cpp fails to compile +// because the operator-> return is improperly deduced as a non-const +// pointer. +#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) // Recall that in general, compilers without partial specialization @@ -36,7 +40,7 @@ // end up using a proxy for operator[] when we otherwise shouldn't. // Using reference constness gives it an extra hint that it can // return the value_type from operator[] directly, but is not -// strictly neccessary. Not sure how best to resolve this one. +// strictly necessary. Not sure how best to resolve this one. # define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1 @@ -44,7 +48,8 @@ #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \ - || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ + || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) # define BOOST_NO_LVALUE_RETURN_DETECTION # if 0 // test code diff --git a/include/boost/iterator/filter_iterator.hpp b/include/boost/iterator/filter_iterator.hpp index 0edede5..96fb843 100644 --- a/include/boost/iterator/filter_iterator.hpp +++ b/include/boost/iterator/filter_iterator.hpp @@ -31,9 +31,9 @@ namespace boost , typename mpl::if_< is_convertible< typename iterator_traversal::type - , bidirectional_traversal_tag + , random_access_traversal_tag > - , forward_traversal_tag + , bidirectional_traversal_tag , use_default >::type > type; diff --git a/include/boost/iterator/iterator_adaptor.hpp b/include/boost/iterator/iterator_adaptor.hpp index eabacde..457c439 100644 --- a/include/boost/iterator/iterator_adaptor.hpp +++ b/include/boost/iterator/iterator_adaptor.hpp @@ -278,6 +278,8 @@ namespace boost { } + typedef Base base_type; + Base const& base() const { return m_iterator; } diff --git a/include/boost/iterator/iterator_archetypes.hpp b/include/boost/iterator/iterator_archetypes.hpp index 8c09328..9ffa420 100644 --- a/include/boost/iterator/iterator_archetypes.hpp +++ b/include/boost/iterator/iterator_archetypes.hpp @@ -240,8 +240,7 @@ namespace detail { template struct archetype - : public partially_ordered >, - public traversal_archetype_ + : public traversal_archetype_ { Derived& operator+=(std::ptrdiff_t) { return static_object::get(); } Derived& operator-=(std::ptrdiff_t) { return static_object::get(); } @@ -272,6 +271,21 @@ namespace detail traversal_archetype_ const&) { return true; } + template + bool operator>(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + template + bool operator<=(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + + template + bool operator>=(traversal_archetype_ const&, + traversal_archetype_ const&) + { return true; } + struct bogus_type; template diff --git a/include/boost/iterator/iterator_facade.hpp b/include/boost/iterator/iterator_facade.hpp index 3b40db2..ddb237d 100644 --- a/include/boost/iterator/iterator_facade.hpp +++ b/include/boost/iterator/iterator_facade.hpp @@ -7,8 +7,6 @@ #ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP #define BOOST_ITERATOR_FACADE_23022003THW_HPP -#include - #include #include #include @@ -16,6 +14,9 @@ #include #include +#include +#include + #include #include #include @@ -106,7 +107,7 @@ namespace boost typedef typename mpl::eval_if< detail::iterator_writability_disabled - , add_pointer::type> + , add_pointer , add_pointer >::type pointer; @@ -269,8 +270,8 @@ namespace boost struct postfix_increment_result : mpl::eval_if< mpl::and_< - // A proxy is only needed for readable iterators - is_convertible + // A proxy is only needed for readable iterators + is_convertible // No multipass iterator can have values that disappear // before positions can be re-visited @@ -322,7 +323,7 @@ namespace boost static type make(Reference x) { - return type(&x); + return implicit_cast(&x); } }; diff --git a/include/boost/iterator/zip_iterator.hpp b/include/boost/iterator/zip_iterator.hpp index 72ab9a3..817bbab 100755 --- a/include/boost/iterator/zip_iterator.hpp +++ b/include/boost/iterator/zip_iterator.hpp @@ -19,6 +19,7 @@ // Borland 5.5.1 (broken due to lack of support from Boost.Tuples) #ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ +# define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ #include #include