Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#7856 closed Bugs (fixed)

pop_front() and pop_back() docs missing

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

Description

These iterator_range functions appear to be undocumented.

Change History (6)

comment:1 by Dave Abrahams, 10 years ago

OK, but the names (at least the ones that get documented) should be changed to drop_front and drop_back. pop_xxx implies the element is getting destroyed.

comment:2 by Neil Groves, 9 years ago

Milestone: To Be DeterminedBoost 1.56.0
Status: newassigned

That's a great suggestion. I used the names from the Alexandrescu work, but this is better.

comment:3 by Olaf van der Spek <ml@…>, 9 years ago

I like pop_ better, especially as existing code is already using it. The type already indicates it's not actually destroying elements. Just like pop_back() for a vector<T*>.

comment:4 by Neil Groves, 9 years ago

Resolution: fixed
Status: assignedclosed

I much prefer drop_front and drop_back as it avoids accidentally modifying containers. While I appreciate the frustration of having to modify your code it is a small change to functions that were not documented.

I've modified all of my code that uses these functions in the space of half an hour. I hope that the increased work that you incur is small too.

I've renamed the functions and added tests for these.

comment:5 by Olaf van der Spek <ml@…>, 9 years ago

I'll survive, do the required #ifdef's based on BOOST_VERSION probably won't be pretty.

comment:6 by Olaf van der Spek <ml@…>, 9 years ago

though*

Note: See TracTickets for help on using tickets.