Ticket #7731 (closed Bugs: fixed)

Opened 3 years ago

Last modified 2 years 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:


The code

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

prints "036" instead of "0369".

Similar (but another) bug:


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

Change History

Changed 3 years ago by mazay0@…

patch for irange

comment:1 Changed 2 years ago by nathanridge

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

comment:2 Changed 2 years ago by nathanridge

Thanks for the report and patch! Fixed in trunk.

comment:3 Changed 2 years 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 2 years ago by nathanridge

Fixed for 1.54.


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.