Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2002-02-05 16:35:13


--- In boost_at_y..., Thomas Witt <witt_at_i...> wrote:
> > m_bounds.second - m_bounds.first could be negative. But
cycle_size_()
> > is always returing positive number. What is cycle_size you
mentioning?
>
> Is this really true. I think all methods assume second >= first and
I think
> thats ok. m_bounds should be required to be a valid half_open range.

Oops. I are right of course. I do not know where did I get an idea
that they could be in wrong order. I uploaded fixed version.

>
> I hadn't time to check it but I really feel uncomfortable with the
advance
> code. Gennadiy are you aware of the fact that advance, despite its
name,
> might be called with negative argument? That one fooled me. I hope
to give it
> a closer look tomorrow

Yes, advance will work correctly for both negative and positive n,
independently on operator% implementation. The only requirement is
like this:
   For any y and any z > 0: x = y % z => |x| < z

>
> Thomas

Gennadiy.


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