Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add emplace_back() and emplace_front() to boost::circular_buffer #46

Open
lano1106 opened this issue May 31, 2023 · 4 comments
Open

Comments

@lano1106
Copy link

this should be trivial to do. In fact, I might give implementing it a shot...

@mclow mclow transferred this issue from boostorg/boost May 31, 2023
@Lishen1
Copy link

Lishen1 commented May 31, 2023

It's already implemented in some PR

@Lishen1
Copy link

Lishen1 commented Jun 1, 2023

#15

@lano1106
Copy link
Author

lano1106 commented Jun 1, 2023

thx! This is exactly what I was looking for... Yesterday, I have written the feature myself and after reviewing the PR commits, I find it recomforting that I have came up more or less with exactly the same implementation... (minus the unit tests)...

I suppose this is can be seen as a confirmation that the pull request is good...

Any idea when it is going to be merged? Any chance that it makes it to the next release?

Note, that it does not change anything for me as taking the PR code and using it simply consists of copying a header file. No recompilation is required... but I am thinking about the other users...

That was the lack of emplace functions that made me stick with std::deque and use it as a circular buffer...

but boost::circular_buffer is incredibly superior for that purpose due to its amazing memory allocation behavior. deque keeps allocating/deallocating all the way even if its number of elements remains constant...

boost::circular_buffer is an amazing little known gem...

@Lishen1
Copy link

Lishen1 commented Jun 1, 2023

looks like nobody care about this PR. I just use code from PR directly since boost containers is header-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants