Spirit miniboost update.

[SVN r30504]
This commit is contained in:
Hartmut Kaiser
2005-08-08 02:18:32 +00:00
parent 4fe621f006
commit bedcfb875a
6 changed files with 36 additions and 13 deletions

View File

@ -22,7 +22,11 @@
# define BOOST_ITERATOR_CONFIG_DEF # define BOOST_ITERATOR_CONFIG_DEF
#endif #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)) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531))
// Recall that in general, compilers without partial specialization // Recall that in general, compilers without partial specialization
@ -36,7 +40,7 @@
// end up using a proxy for operator[] when we otherwise shouldn't. // end up using a proxy for operator[] when we otherwise shouldn't.
// Using reference constness gives it an extra hint that it can // Using reference constness gives it an extra hint that it can
// return the value_type from operator[] directly, but is not // 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 # define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1
@ -44,7 +48,8 @@
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \ || 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 # define BOOST_NO_LVALUE_RETURN_DETECTION
# if 0 // test code # if 0 // test code

View File

@ -31,9 +31,9 @@ namespace boost
, typename mpl::if_< , typename mpl::if_<
is_convertible< is_convertible<
typename iterator_traversal<Iterator>::type typename iterator_traversal<Iterator>::type
, bidirectional_traversal_tag , random_access_traversal_tag
> >
, forward_traversal_tag , bidirectional_traversal_tag
, use_default , use_default
>::type >::type
> type; > type;

View File

@ -278,6 +278,8 @@ namespace boost
{ {
} }
typedef Base base_type;
Base const& base() const Base const& base() const
{ return m_iterator; } { return m_iterator; }

View File

@ -240,8 +240,7 @@ namespace detail
{ {
template<class Derived, class Value> template<class Derived, class Value>
struct archetype struct archetype
: public partially_ordered<traversal_archetype_<Derived, Value, random_access_traversal_tag> >, : public traversal_archetype_<Derived, Value, bidirectional_traversal_tag>
public traversal_archetype_<Derived, Value, bidirectional_traversal_tag>
{ {
Derived& operator+=(std::ptrdiff_t) { return static_object<Derived>::get(); } Derived& operator+=(std::ptrdiff_t) { return static_object<Derived>::get(); }
Derived& operator-=(std::ptrdiff_t) { return static_object<Derived>::get(); } Derived& operator-=(std::ptrdiff_t) { return static_object<Derived>::get(); }
@ -272,6 +271,21 @@ namespace detail
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&) traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
{ return true; } { return true; }
template <class Derived, class Value>
bool operator>(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
{ return true; }
template <class Derived, class Value>
bool operator<=(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
{ return true; }
template <class Derived, class Value>
bool operator>=(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
{ return true; }
struct bogus_type; struct bogus_type;
template <class Value> template <class Value>

View File

@ -7,8 +7,6 @@
#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP #ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP
#define BOOST_ITERATOR_FACADE_23022003THW_HPP #define BOOST_ITERATOR_FACADE_23022003THW_HPP
#include <boost/static_assert.hpp>
#include <boost/iterator.hpp> #include <boost/iterator.hpp>
#include <boost/iterator/interoperable.hpp> #include <boost/iterator/interoperable.hpp>
#include <boost/iterator/iterator_traits.hpp> #include <boost/iterator/iterator_traits.hpp>
@ -16,6 +14,9 @@
#include <boost/iterator/detail/facade_iterator_category.hpp> #include <boost/iterator/detail/facade_iterator_category.hpp>
#include <boost/iterator/detail/enable_if.hpp> #include <boost/iterator/detail/enable_if.hpp>
#include <boost/implicit_cast.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/add_const.hpp> #include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_pointer.hpp> #include <boost/type_traits/add_pointer.hpp>
@ -106,7 +107,7 @@ namespace boost
typedef typename mpl::eval_if< typedef typename mpl::eval_if<
detail::iterator_writability_disabled<ValueParam,Reference> detail::iterator_writability_disabled<ValueParam,Reference>
, add_pointer<typename add_const<value_type>::type> , add_pointer<const value_type>
, add_pointer<value_type> , add_pointer<value_type>
>::type pointer; >::type pointer;
@ -269,8 +270,8 @@ namespace boost
struct postfix_increment_result struct postfix_increment_result
: mpl::eval_if< : mpl::eval_if<
mpl::and_< mpl::and_<
// A proxy is only needed for readable iterators // A proxy is only needed for readable iterators
is_convertible<Reference,Value> is_convertible<Reference,Value const&>
// No multipass iterator can have values that disappear // No multipass iterator can have values that disappear
// before positions can be re-visited // before positions can be re-visited
@ -322,7 +323,7 @@ namespace boost
static type make(Reference x) static type make(Reference x)
{ {
return type(&x); return implicit_cast<type>(&x);
} }
}; };

View File

@ -19,6 +19,7 @@
// Borland 5.5.1 (broken due to lack of support from Boost.Tuples) // Borland 5.5.1 (broken due to lack of support from Boost.Tuples)
#ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_ #ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
# define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
#include <stddef.h> #include <stddef.h>
#include <boost/iterator.hpp> #include <boost/iterator.hpp>