Modify

Opened 4 years ago

Last modified 4 years ago

#9299 new Feature Requests

Feature Requests: circular_buffer::emplace(...)

Reported by: anonymous Owned by: No-Maintainer
Milestone: To Be Determined Component: circular_buffer
Version: Boost Development Trunk Severity: Not Applicable
Keywords: circular_buffer emplace c++11 Cc:

Description

I think a great addition to circular_buffer would be to support emplace(...)/emplace_back()/emplace_front() to make it more C++11 compliant.

At the first quick glance I took at the source, implementation seems straight-forward, more or less c&p the code from insert/push_back/push_front and construct the items in-place instead. The tricky part however would be to stay compliant with older C++ versions, if that is a desired feature (and it seems to be considering that e.g. Boost.Move can be used instead of the C++11 move semantics). I do not have an idea how to do this as I'm not an experienced boost developer (or actually even user for that matter).

If older C++-compliance is not needed and my assumption of simply "c&ping insert/push_back/push_front" is confirmed by a boost developer, I could probably provide a patch a few weeks from now (my time is a bit limited at the moment) if required. If the compliance is needed however, I would prefer that a more experienced developer would implement it.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by Jan Gaspar

Owner: changed from Jan Gaspar to No-Maintainer

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain No-Maintainer.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.