Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5544 closed Bugs (fixed)

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

Reported by: hotwatermorning Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost 1.46.1 Severity: Showstopper
Keywords: Cc:


The code

std::cout << boost::irange(0, 9, 2) << std::endl;

prints "0246" instead of "02468".

Attachments (1)

patch.txt (740 bytes) - added by hotwatermorning 7 years ago.
patch for irange.hpp

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by hotwatermorning

Attachment: patch.txt added

patch for irange.hpp

comment:1 Changed 7 years ago by Neil Groves

Resolution: fixed
Status: newclosed

Thanks for the defect report. Additional tests have been created, and a fix put into the code for boost trunk. The supplied patch would introduce a number of regressions, hence a different solution was employed.

comment:2 Changed 7 years ago by Akira Takahashi(faithandbrave@…

This is broken change. It is necessary to write in a history document clearly.

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.