mirror of
https://github.com/boostorg/iterator.git
synced 2025-05-09 23:23:54 +00:00
Removed dependency on Boost.Conversion in tests.
This reduces the minimum supported compilers versions.
This commit is contained in:
parent
80bb1ac9e4
commit
a9dabd3c65
@ -22,7 +22,6 @@
|
||||
# include <iterator>
|
||||
# include <boost/static_assert.hpp>
|
||||
# include <boost/concept_archetype.hpp> // for detail::dummy_constructor
|
||||
# include <boost/implicit_cast.hpp>
|
||||
# include <boost/core/ignore_unused.hpp>
|
||||
# include <boost/core/lightweight_test.hpp>
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
@ -223,12 +222,15 @@ void random_access_iterator_test(Iterator i, int N, TrueVals vals)
|
||||
int c;
|
||||
|
||||
typedef typename std::iterator_traits<Iterator>::value_type value_type;
|
||||
boost::ignore_unused<value_type>();
|
||||
struct local
|
||||
{
|
||||
static value_type to_value_type(value_type v) { return v; }
|
||||
};
|
||||
|
||||
for (c = 0; c < N-1; ++c) {
|
||||
BOOST_TEST(i == j + c);
|
||||
BOOST_TEST(*i == vals[c]);
|
||||
BOOST_TEST(*i == boost::implicit_cast<value_type>(j[c]));
|
||||
BOOST_TEST(*i == local::to_value_type(j[c]));
|
||||
BOOST_TEST(*i == *(j + c));
|
||||
BOOST_TEST(*i == *(c + j));
|
||||
++i;
|
||||
@ -242,7 +244,7 @@ void random_access_iterator_test(Iterator i, int N, TrueVals vals)
|
||||
for (c = 0; c < N-1; ++c) {
|
||||
BOOST_TEST(i == k - c);
|
||||
BOOST_TEST(*i == vals[N - 1 - c]);
|
||||
BOOST_TEST(*i == boost::implicit_cast<value_type>(j[N - 1 - c]));
|
||||
BOOST_TEST(*i == local::to_value_type(j[N - 1 - c]));
|
||||
Iterator q = k - c;
|
||||
boost::ignore_unused(q);
|
||||
BOOST_TEST(*i == *q);
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <boost/iterator/new_iterator_tests.hpp>
|
||||
|
||||
#include <boost/call_traits.hpp>
|
||||
#include <boost/polymorphic_cast.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
|
||||
@ -188,12 +187,12 @@ struct derived : base
|
||||
|
||||
virtual void assign(const base &b)
|
||||
{
|
||||
state = boost::polymorphic_cast<const derived *>(&b)->state;
|
||||
state = dynamic_cast<const derived &>(b).state;
|
||||
}
|
||||
|
||||
virtual bool equal(const base &b) const
|
||||
{
|
||||
return state == boost::polymorphic_cast<const derived *>(&b)->state;
|
||||
return state == dynamic_cast<const derived &>(b).state;
|
||||
}
|
||||
|
||||
int state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user