Subject: Re: [boost] Abstract STL Container Adaptors
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-03-18 10:46:48
On 18 March 2013 09:35, Nevin Liber <nevin_at_[hidden]> wrote:
> On 18 March 2013 07:29, Thorsten Ottosen <thorsten.ottosen_at_[hidden]>wrote:
>> Its no different than using boost::function<>, that is, it allow us to
>> make a generic interface with decisions deferred till run-time (at the
>> expense of a performance loss).
> It isn't just *one* generic interface; the underlying iterators have to be
> type erased as well.
To be completely generic, you may need to type erase allocator_type,
pointer, const_pointer, reference, const_reference, size_type and
difference_type (since they may all differ between containers, and many of
those types now come from the underlying allocator), as well as have the
ability to pass an allocator in for both holding the type erased container
as well as any of the underlying type erased objects.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk