Boost logo

Boost :

Subject: Re: [boost] Proposal: Monotonic Containers
From: Peter Bindels (dascandy_at_[hidden])
Date: 2009-06-10 05:17:46


Christian,

2009/6/10 Christian Schladetsch <christian.schladetsch_at_[hidden]>

> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk