Boost logo

Boost :

Subject: Re: [boost] [BGL] container_gen (was Re: [tree] reviving the tree library)
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-05-11 00:02:19


On Mon, 9 May 2011, Cromwell Enage wrote:

> --- On Fri, 5/6/11, Erik Erlandson wrote:
>> My storage models are effectively wrappers around the
>> underlying containers (the container is a member of
>> the node type). I originally thought it would be nice
>> to allow a user to somehow drop in any container they
>> wanted, but I was unable to find a way to make that
>> work properly.
>
> [snip]
>
>> Perhaps container_gen would allow it to be more fully
>> automated.
>
> The idea behind container_gen is indeed to allow users to drop in containers of their choosing by providing their own specializations and selectors. In turn, your node class template needs only to take in the selector type as an additional template parameter.
>
> One current limitation that may be important to you is the inability to supply custom allocators as well. I saw in the sandbox that the BGL authors were planning to provide selector templates parameterized by allocator type. I'm wondering how that work is progressing.
>
> At any rate, to the BGL authors: I find container_gen to be a useful
> utility metafunction outside its current home. Would anyone else like
> to see it become a first-class Boost citizen?

I would be happy to see it as a separate component, plus potentially
updated with more container types (Boost.Intrusive, Boost.Interprocess,
etc.) as well as allocators, which have been desired for a while in BGL.

-- Jeremiah Willcock


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