[pool] A pool object as allocator to std container?

29 Mar
2008
29 Mar
'08
8:22 p.m.
I was able to use something like the following: boost::object_pool<std::set<int> > front; but I'd instead want to be able to use: boost::object_pool<int> back; boost::object_pool<std::set<int, boost::object_pool<int> > front(back); which is not possible because the object_pool does not conform to the standard allocator interface. For the time being it's possible to do: boost::object_pool<std::set<int, boost::pool_allocator<int> > front; but an element set from the pool does not interact well with a plain std::set<int>. Any suggestion on a solution? Thanks, Greg
6286
Age (days ago)
6286
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gregory Dai