Modify

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: 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 (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@…

patch for irange

comment:1 Changed 4 years ago by nathanridge

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

comment:2 Changed 4 years ago by nathanridge

Thanks for the report and patch! Fixed in trunk.

comment:3 Changed 4 years ago by nathanridge

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

(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 nathanridge

Fixed for 1.54.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain neilgroves.
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.