Allocate member variables with custom allocator#76
Allocate member variables with custom allocator#76quantumwizard wants to merge 3 commits intoboostorg:developfrom
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