Modify

Ticket #7731 (closed Bugs: fixed)

Opened 17 months ago

Last modified 10 months ago

irange doesn't end iteration properly when step_size is 3 or more

Reported by: mazay0@… Owned by: neilgroves
Milestone: To Be Determined Component: range
Version: Boost 1.52.0 Severity: Showstopper
Keywords: Cc:

Description

The code

std::cout << boost::irange(0, 10, 3) << std::endl;

prints "036" instead of "0369".

Similar (but another) bug:  https://svn.boost.org/trac/boost/ticket/5544

Attachments

irange.hpp.patch Download (609 bytes) - added by mazay0@… 17 months ago.
patch for irange

Change History

Changed 17 months ago by mazay0@…

patch for irange

comment:1 Changed 10 months ago by nathanridge

(In [84701]) [range] Fix off-by-one error in implementation of irange() (refs #7731).

comment:2 Changed 10 months ago by nathanridge

Thanks for the report and patch! Fixed in trunk.

comment:3 Changed 10 months ago by nathanridge

  • Status changed from new to closed
  • Resolution set to fixed

(In [84823]) [range] Merge Boost.Range bug fixes to release branch (fixes #6944; fixes #7407; fixes #7408; fixes #7731; fixes #7827; fixes #8338; fixes #8453).

comment:4 Changed 10 months ago by nathanridge

Fixed for 1.54.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.