Boost logo

Boost :

From: DY, JERRY U \(SBCSI\) (jd2419_at_[hidden])
Date: 2004-07-22 11:32:27


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_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of David Abrahams
Sent: Thursday, July 22, 2004 7:20 AM
To: boost_at_[hidden]
Subject: [boost] Re: counting_iterator_test.hpp fails on aC++

"DY, JERRY U \(SBCSI\)" <jd2419_at_[hidden]> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk