------- Comment #12 from Woebbeking at web dot de 2006-01-30 12:03 ------- Subject: Re: std::advance() isn't stable for floating point numbers
On Monday 30 January 2006 08:54, gdr at integrable-solutions dot net wrote: > ------- Comment #11 from gdr at integrable-solutions dot net > | FYI, I suggested tests for > 0 and < 0 as MSVC 7.1 does it that > | way. > | > | If you convert Distance to difference_type the question is what > | happens if Distance is i.e. 0.2. Do you advance by 0 or 1 position? > > does not that follow from the conversion rule? Of course. I meant what should it do. Do you want it to advance by 0 or 1 position? Do we just use a simple cast or do we need to do some rounding? AFAIK MSVC advance by 1 in this case. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26020