Modify

Ticket #5544 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

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

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

Description

The code

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

prints "0246" instead of "02468".

Attachments

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

Change History

Changed 3 years ago by hotwatermorning

patch for irange.hpp

comment:1 Changed 3 years ago by neilgroves

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

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 3 years ago by Akira Takahashi(faithandbrave@…

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

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.