-2

If I say this, I get a strange compiler (gcc4.9, boost 1_58) error later on:

When i go to access this IL:

for(auto & odp : odpList[i]) //<-error here
{

/usr/local/include/boost/intrusive/pack_options.hpp|33|error: no class template named ‘pack’ in ‘class boost::fast_pool_allocator<OneDepthPrice>’

typedef std::tuple<int, int> OneDepthPrice
typedef boost::intrusive::list<OneDepthPrice,  boost::fast_pool_allocator<OneDepthPrice>, constant_time_size<false>> BaseList;

What is the correct way to do this?

Ivan
  • 7,448
  • 14
  • 69
  • 134
  • Please post the minimum amount of code required to generate your error. And please post your entire error. Please put comments detailing what lines are being referred to. If you are using a library, and lines form it are mentioned in the error messages, please include the version of the library. These improvements can be edited in one at a time. – Yakk - Adam Nevraumont May 04 '15 at 19:59
  • Yakk, is there a way to use fast_pool_allocator with an intrusive list? – Ivan May 08 '15 at 19:23

1 Answers1

1

It's because an allocator is not an "option" that you can pass.

It doesn't make sense to try and pass an allocator to an intrusive container, though, since you would be the one managing the allocations outside of the container.

sehe
  • 374,641
  • 47
  • 450
  • 633
user541686
  • 205,094
  • 128
  • 528
  • 886