
The problem is that since my_int2 is not a random access iterator, class iterator_adaptor's member function "advance" would not compile because of the static assertion below trying to convert random_access_traversal_tag to bidirectional_traversal_tag (my_traversal). FILE: boost/iterator/iterator_adaptor.hpp:310 void advance(typename super_t::difference_type n) { // precompiled to: // typedef int assertion[sizeof(detail::static_assert_convertible_to<random_access_trav ersal_tag>(my_traversal()))]; BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) m_iterator += n; } -Jerry -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of David Abrahams Sent: Thursday, July 22, 2004 7:20 AM To: boost@lists.boost.org Subject: [boost] Re: counting_iterator_test.hpp fails on aC++ "DY, JERRY U \(SBCSI\)" <jd2419@sbc.com> writes:
Sorry... sent the original e-mail too quickly. Here's why I say that std::numeric_limits has to be specialized and the is_specialized member must be set to true if you want a particular type to pass the is_numeric test.
But we don't want my_int2 to pass the is_numeric test. What's the problem? If counting_iterator_test.cpp fails there must be another reason.