Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#7731 closed Bugs (fixed)

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

Reported by: mazay0@… Owned by: Neil Groves
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:

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by mazay0@…

Attachment: irange.hpp.patch added

patch for irange

comment:1 Changed 4 years ago by Nathan Ridge

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

comment:2 Changed 4 years ago by Nathan Ridge

Thanks for the report and patch! Fixed in trunk.

comment:3 Changed 4 years ago by Nathan Ridge

Resolution: fixed
Status: newclosed

(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 4 years ago by Nathan Ridge

Fixed for 1.54.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Neil Groves.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.