28 Aug
2015
28 Aug
'15
11:26 p.m.
On Fri, Aug 28, 2015, [Matt] wrote:
I do understand the issue and want to address it, so to be clear, you are talking about wrapping the following and other rebinds:
Yes.
I get that using allocator_traits seems to be the preferred C++11 way of doing things but I don't know why?
It's because a conforming C++11 custom allocator does not need to provide certain members. it is designed to be used through std::allocator_traits which will infer those members from what the allocator does provide.
Also can I use boost::allocator_traits to do the same thing in C++0x-friendly code?
Yes. :-) boost::allocator_traits is a perfectly reasonable way to have the same thing in C++03 friendly code. Best, Glen