Opened 8 years ago

Closed 8 years ago

#10239 closed Bugs (fixed)

advance_begin, pop_front etc missing

Reported by: Olaf van der Spek <ml@…> Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost 1.56.0 Severity: Problem
Keywords: Cc:

Description

It seems iterator_range dropped functions like advance_begin, pop_front etc. This BREAKS existing code and isn't mentioned in the documentation. Did I miss something?

It'd be nice if existing functionality was properly deprecated instead of being dropped on the floor.

http://www.boost.org/users/history/version_1_56_0.html http://www.boost.org/doc/libs/1_56_0_b1/libs/range/doc/html/range/upgrade/upgrade_from_1_55.html

Change History (3)

comment:1 by Neil Groves, 8 years ago

The procedure for deprecation is applied for public documented parts of Boost APIs. The functions to which you refer where not part of the public documented interface. We discussed this here: http://lists.boost.org/Archives/boost/2013/01/199947.php

I received strong feedback that the pop_front and pop_back names were highly confusing. David Abrahams proposed changing the names to drop_front / drop_back. As I mentioned in my previous discussions I was actively working on refining good Concepts that would incorporate some of the valuable work by Alexandrescu.

You will find that the function pop_front simply needs to be renamed to drop_front and that pop_back needs to be renamed to drop_back. No functionality has been removed. No public documented features have been broken to the best of my knowledge and belief. The synopsis for iterator_range http://www.boost.org/doc/libs/master/libs/range/doc/html/range/reference/utilities/iterator_range.html contains the drop_front, and drop_back member functions. The drop_back and drop_front member functions are therefore new public and official functions to replace the undocumented pop_front, pop_back, advance_begin. I added a new unit test and brought the functionality up to the standard of the other public functions.

comment:2 by Neil Groves, 8 years ago

Eric has corrected me, it was not correct that advance_begin / advance_end were not documented and public. This is therefore a serious matter indeed. I have made an immediate fix and pushed to the develop branch.

I have restored the pop_front() and pop_back() functions as deprecated functions. The advance_begin(difference_type) and advance_end(difference_type) have been put back into the code and will not be removed at a future point. Very rudimentary unit tests have been added for these.

I shall merge to master in cooperation with the release team and do my best to ensure this gets into 1.56.

I'm sorry for my errors.

comment:3 by Eric Niebler, 8 years ago

Resolution: fixed
Status: newclosed

The fix for this bug will (hopefully!) have the distinction of being the last change to make it into 1.56.0. Thanks Olaf for raising the issue.

Note: See TracTickets for help on using tickets.