diff --git a/iterator_adaptor_test.cpp b/iterator_adaptor_test.cpp index e510323..c1661fe 100644 --- a/iterator_adaptor_test.cpp +++ b/iterator_adaptor_test.cpp @@ -127,19 +127,20 @@ main() // Test computation of defaults typedef boost::iterator_adaptor > Iter1; - BOOST_STATIC_ASSERT((boost::is_same::value_type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same::reference, int&>::value)); - BOOST_STATIC_ASSERT((boost::is_same::pointer, int*>::value)); - BOOST_STATIC_ASSERT((boost::is_same::difference_type, std::ptrdiff_t>::value)); - BOOST_STATIC_ASSERT((boost::is_same::iterator_category, std::random_access_iterator_tag>::value)); + // don't use std::iterator_traits here to avoid VC++ problems + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } { // Test computation of default when the Value is const typedef boost::iterator_adaptor > Iter1; - BOOST_STATIC_ASSERT((boost::is_same::value_type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same::reference, const int&>::value)); - BOOST_STATIC_ASSERT((boost::is_same::pointer, const int*>::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } { // Test with no defaults @@ -150,11 +151,11 @@ main() boost::iterator_category_is, boost::difference_type_is > Iter1; - BOOST_STATIC_ASSERT((boost::is_same::value_type, char>::value)); - BOOST_STATIC_ASSERT((boost::is_same::reference, long>::value)); - BOOST_STATIC_ASSERT((boost::is_same::pointer, float>::value)); - BOOST_STATIC_ASSERT((boost::is_same::difference_type, int>::value)); - BOOST_STATIC_ASSERT((boost::is_same::iterator_category, std::input_iterator_tag>::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } // Test the iterator_adaptor