-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allocate member variables with custom allocator #76
base: develop
Are you sure you want to change the base?
Conversation
Since a custome Allocator can by provided, I think it should be used with the member std::vector variables
This shouldn't work; because |
@mclow I made changes to rebind the allocator for the correct types |
Codecov Report
@@ Coverage Diff @@
## develop #76 +/- ##
========================================
Coverage 64.33% 64.33%
========================================
Files 10 10
Lines 816 816
Branches 290 290
========================================
Hits 525 525
Misses 125 125
Partials 166 166
Continue to review full report at Codecov.
|
That's better. I will give this a try (and probably commit it), but this is not even close to right. (the code, not the patch). There's no provision for actually supplying an allocator to this class. It's all "default construct" everywhere. This works great for stateless allocators, but not so well for stateful ones. |
using boost::allocator_rebind so it will work with bost c++17 deprecation of std::allocator::rebind
member std::vector variables should use template parameter Allocator instead of default std::allocator