mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-11 13:33:56 +00:00
Iterator: Remove obsolete MSVC version checks.
[SVN r86082] Conflicts: include/boost/iterator/iterator_facade.hpp
This commit is contained in:
parent
0345db959b
commit
6883d083d2
@ -46,8 +46,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \
|
||||
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|
||||
|| BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \
|
||||
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
|
||||
@ -115,12 +114,6 @@
|
||||
# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
|
||||
#endif
|
||||
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
# define BOOST_ARG_DEPENDENT_TYPENAME typename
|
||||
# else
|
||||
# define BOOST_ARG_DEPENDENT_TYPENAME
|
||||
# endif
|
||||
|
||||
# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
|
||||
// GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion
|
||||
|
@ -14,7 +14,6 @@
|
||||
#undef BOOST_NO_IS_CONVERTIBLE
|
||||
#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE
|
||||
#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
|
||||
#undef BOOST_ARG_DEPENDENT_TYPENAME
|
||||
#undef BOOST_NO_LVALUE_RETURN_DETECTION
|
||||
#undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
|
||||
|
||||
|
@ -72,9 +72,6 @@ namespace boost
|
||||
: mpl::identity<Return>
|
||||
# endif
|
||||
{
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
typedef Return type;
|
||||
# endif
|
||||
};
|
||||
|
||||
} // namespace iterators
|
||||
|
@ -132,7 +132,6 @@ template <class Category, class Traversal>
|
||||
struct iterator_category_with_traversal
|
||||
: Category, Traversal
|
||||
{
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
// Make sure this isn't used to build any categories where
|
||||
// convertibility to Traversal is redundant. Should just use the
|
||||
// Category element in that case.
|
||||
@ -148,7 +147,6 @@ struct iterator_category_with_traversal
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
|
||||
BOOST_MPL_ASSERT((is_iterator_traversal<Traversal>));
|
||||
# endif
|
||||
# endif
|
||||
};
|
||||
|
||||
// Computes an iterator_category tag whose traversal is Traversal and
|
||||
@ -156,9 +154,7 @@ struct iterator_category_with_traversal
|
||||
template <class Traversal, class ValueParam, class Reference>
|
||||
struct facade_iterator_category_impl
|
||||
{
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_MPL_ASSERT_NOT((is_iterator_category<Traversal>));
|
||||
# endif
|
||||
|
||||
typedef typename iterator_facade_default_category<
|
||||
Traversal,ValueParam,Reference
|
||||
|
26
include/boost/iterator/detail/minimum_category.hpp
Executable file → Normal file
26
include/boost/iterator/detail/minimum_category.hpp
Executable file → Normal file
@ -21,17 +21,7 @@ namespace boost { namespace detail {
|
||||
//
|
||||
//
|
||||
template <bool GreaterEqual, bool LessEqual>
|
||||
struct minimum_category_impl
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
{
|
||||
template <class T1, class T2> struct apply
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
typedef void type;
|
||||
}
|
||||
# endif
|
||||
;
|
||||
struct minimum_category_impl;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct error_not_related_by_convertibility;
|
||||
@ -77,14 +67,8 @@ template <class T1 = mpl::_1, class T2 = mpl::_2>
|
||||
struct minimum_category
|
||||
{
|
||||
typedef minimum_category_impl<
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
is_same<T2,int>::value ||
|
||||
# endif
|
||||
::boost::is_convertible<T1,T2>::value
|
||||
, ::boost::is_convertible<T2,T1>::value
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
|| is_same<T1,int>::value
|
||||
# endif
|
||||
> outer;
|
||||
|
||||
typedef typename outer::template apply<T1,T2> inner;
|
||||
@ -102,14 +86,6 @@ struct minimum_category<mpl::_1,mpl::_2>
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2))
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
template <>
|
||||
struct minimum_category<int,int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
# endif
|
||||
|
||||
}} // namespace boost::detail
|
||||
|
||||
|
@ -121,11 +121,7 @@ namespace boost
|
||||
is_class<Predicate>
|
||||
, Iterator
|
||||
>::type x
|
||||
, Iterator end = Iterator()
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
, Predicate* = 0
|
||||
#endif
|
||||
)
|
||||
, Iterator end = Iterator())
|
||||
{
|
||||
return filter_iterator<Predicate,Iterator>(x,end);
|
||||
}
|
||||
|
@ -99,22 +99,7 @@ namespace boost
|
||||
// false positives for user/library defined iterator types. See comments
|
||||
// on operator implementation for consequences.
|
||||
//
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
template<typename From, typename To>
|
||||
struct enable_if_convertible
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
mpl::or_<
|
||||
is_same<From,To>
|
||||
, is_convertible<From, To>
|
||||
>
|
||||
, boost::detail::enable_type
|
||||
, int&
|
||||
>::type type;
|
||||
};
|
||||
|
||||
# elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
|
||||
# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
|
||||
|
||||
template <class From, class To>
|
||||
struct enable_if_convertible
|
||||
@ -122,7 +107,7 @@ namespace boost
|
||||
typedef boost::detail::enable_type type;
|
||||
};
|
||||
|
||||
# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300
|
||||
# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292))
|
||||
|
||||
// For some reason vc7.1 needs us to "cut off" instantiation
|
||||
// of is_convertible in a few cases.
|
||||
|
@ -200,12 +200,6 @@ namespace detail
|
||||
bool operator==(traversal_archetype_<Derived, Value, single_pass_traversal_tag> const&,
|
||||
traversal_archetype_<Derived, Value, single_pass_traversal_tag> const&) { return true; }
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
// doesn't seem to pick up != from equality_comparable
|
||||
template <class Derived, class Value>
|
||||
bool operator!=(traversal_archetype_<Derived, Value, single_pass_traversal_tag> const&,
|
||||
traversal_archetype_<Derived, Value, single_pass_traversal_tag> const&) { return true; }
|
||||
#endif
|
||||
template <>
|
||||
struct traversal_archetype_impl<forward_traversal_tag>
|
||||
{
|
||||
@ -336,9 +330,7 @@ struct iterator_access_archetype_impl<
|
||||
template <class Value>
|
||||
struct archetype
|
||||
{
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_STATIC_ASSERT(!is_const<Value>::value);
|
||||
# endif
|
||||
typedef void value_type;
|
||||
typedef void reference;
|
||||
typedef void pointer;
|
||||
@ -389,9 +381,7 @@ struct iterator_access_archetype_impl<iterator_archetypes::writable_lvalue_itera
|
||||
Value, iterator_archetypes::readable_lvalue_iterator_t
|
||||
>
|
||||
{
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
BOOST_STATIC_ASSERT((!is_const<Value>::value));
|
||||
# endif
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -97,14 +97,6 @@ namespace detail
|
||||
>
|
||||
{};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct old_category_to_traversal<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
# endif
|
||||
|
||||
template <class Traversal>
|
||||
struct pure_traversal_tag
|
||||
: mpl::eval_if<
|
||||
@ -131,14 +123,6 @@ namespace detail
|
||||
{
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct pure_traversal_tag<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
# endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
|
@ -65,18 +65,6 @@ namespace boost
|
||||
, class Return
|
||||
>
|
||||
struct enable_if_interoperable
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
mpl::or_<
|
||||
is_convertible<Facade1, Facade2>
|
||||
, is_convertible<Facade2, Facade1>
|
||||
>
|
||||
, Return
|
||||
, int[3]
|
||||
>::type type;
|
||||
};
|
||||
#else
|
||||
: ::boost::iterators::enable_if<
|
||||
mpl::or_<
|
||||
is_convertible<Facade1, Facade2>
|
||||
@ -85,7 +73,6 @@ namespace boost
|
||||
, Return
|
||||
>
|
||||
{};
|
||||
#endif
|
||||
|
||||
//
|
||||
// Generates associated types for an iterator_facade with the
|
||||
@ -325,15 +312,6 @@ namespace boost
|
||||
}
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Deal with ETI
|
||||
template<>
|
||||
struct operator_arrow_dispatch<int, int>
|
||||
{
|
||||
typedef int result_type;
|
||||
};
|
||||
# endif
|
||||
|
||||
// A proxy return type for operator[], needed to deal with
|
||||
// iterators that may invalidate referents upon destruction.
|
||||
// Consider the temporary iterator in *(a + n)
|
||||
@ -408,13 +386,7 @@ namespace boost
|
||||
:
|
||||
# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
|
||||
iterator_difference<I1>
|
||||
# elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
mpl::if_<
|
||||
is_convertible<I2,I1>
|
||||
, typename I1::difference_type
|
||||
, typename I2::difference_type
|
||||
>
|
||||
# else
|
||||
# else
|
||||
mpl::eval_if<
|
||||
is_convertible<I2,I1>
|
||||
, iterator_difference<I1>
|
||||
@ -661,17 +633,6 @@ namespace boost
|
||||
return this->derived();
|
||||
}
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
typename boost::detail::postfix_increment_result<Derived,Value,Reference,CategoryOrTraversal>::type
|
||||
operator++(int)
|
||||
{
|
||||
typename boost::detail::postfix_increment_result<Derived,Value,Reference,CategoryOrTraversal>::type
|
||||
tmp(this->derived());
|
||||
++*this;
|
||||
return tmp;
|
||||
}
|
||||
# endif
|
||||
|
||||
Derived& operator--()
|
||||
{
|
||||
iterator_core_access::decrement(this->derived());
|
||||
@ -702,21 +663,8 @@ namespace boost
|
||||
Derived result(this->derived());
|
||||
return result -= x;
|
||||
}
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// There appears to be a bug which trashes the data of classes
|
||||
// derived from iterator_facade when they are assigned unless we
|
||||
// define this assignment operator. This bug is only revealed
|
||||
// (so far) in STLPort debug mode, but it's clearly a codegen
|
||||
// problem so we apply the workaround for all MSVC6.
|
||||
iterator_facade& operator=(iterator_facade const&)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
# endif
|
||||
};
|
||||
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <class I, class V, class TC, class R, class D>
|
||||
inline typename boost::detail::postfix_increment_result<I,V,R,TC>::type
|
||||
operator++(
|
||||
@ -731,7 +679,6 @@ namespace boost
|
||||
|
||||
return tmp;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
//
|
||||
|
@ -45,38 +45,6 @@ struct iterator_category
|
||||
typedef typename boost::detail::iterator_traits<Iterator>::iterator_category type;
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct iterator_value<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_reference<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_pointer<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_difference<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct iterator_category<int>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
# endif
|
||||
|
||||
} // namespace boost::iterator
|
||||
|
||||
#endif // ITERATOR_TRAITS_DWA200347_HPP
|
||||
|
@ -140,16 +140,9 @@ namespace boost
|
||||
// function pointer in the iterator be 0, leading to a runtime
|
||||
// crash.
|
||||
template <class UnaryFunc, class Iterator>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
typename mpl::if_<
|
||||
#else
|
||||
typename iterators::enable_if<
|
||||
#endif
|
||||
is_class<UnaryFunc> // We should probably find a cheaper test than is_class<>
|
||||
, transform_iterator<UnaryFunc, Iterator>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
, int[3]
|
||||
#endif
|
||||
>::type
|
||||
make_transform_iterator(Iterator it)
|
||||
{
|
||||
|
@ -166,14 +166,7 @@ namespace boost {
|
||||
>
|
||||
struct tuple_meta_accumulate
|
||||
: mpl::eval_if<
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
mpl::or_<
|
||||
#endif
|
||||
boost::is_same<Tuple, tuples::null_type>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
, boost::is_same<Tuple,int>
|
||||
>
|
||||
#endif
|
||||
, mpl::identity<StartType>
|
||||
, tuple_meta_accumulate_impl<
|
||||
Tuple
|
||||
@ -366,14 +359,6 @@ namespace boost {
|
||||
, random_access_traversal_tag
|
||||
>::type type;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
template <>
|
||||
struct minimum_traversal_category_in_iterator_tuple<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
// We need to call tuple_meta_accumulate with mpl::and_ as the
|
||||
// accumulating functor. To this end, we need to wrap it into
|
||||
|
Loading…
x
Reference in New Issue
Block a user