
10 Jun
2009
10 Jun
'09
9:17 a.m.
Christian, 2009/6/10 Christian Schladetsch <christian.schladetsch@gmail.com>
I was wrong.
boost::monotonic::inline_storage<N> storage; std::map<int, float, std::less<int>, boost::monotonic::allocator<int> > v(storage);
Won't even work. Storage is not the allocator. Rather, to not use the container overloads would require:
boost::monotonic::inline_storage<N> storage; std::map<int, float, std::less<int>, boost::monotonic::allocator<int> > v(boost::monotonic::allocator<int>(storage));
Which is dramatically even worse again.
Unless you make the constructor of the allocator explicit, it should work. Kind regards, Peter Bindels