On Sat, Jun 11, 2011 at 1:55 AM, Gokulakannan Somasundaram
We are using Boost format in our project. We want to replace the normal allocator with a special allocator and we don't want any allocation be made with normal new. I was looking at the Boost fusion reference. format_class.hpp
The class accepts a allocator and indeed uses it to instantiate the std::string inside. But there are two vectors inside -
std::vector
items_; // each '%..' directive leads to a format_item std::vector<bool> bound_; // stores which arguments were bound. size() == 0 || num_args I am seeing that the vectors are not using the allocators. Is this the intended behavior? Is it right, to try to make an application not to use the normal new/delete completely?
So you just want to pass the format instance's allocator through to the two std::vector instances? I don't claim any relevant expertise here, but it sounds reasonable to me. Have you tried it?