Boost logo

Boost :

Subject: [boost] [interprocess][circular_buffer] specialized containers should have container template argument
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-05-01 04:44:09


Hi Ion and Jan,

I often use these containers: flat_set, flat_map and circular_buffer.
They are great.

However, we can make them faster if you allow a new template argument.
For example

   template
   <
        class T,
         class Alloc,
         class Buffer = /* some default */
>
   class circular_buffer;

   template
   <
        typename T,
        typename Pred,
        typename Alloc
         class PushBackContainer = /* some default */
>
   class flat_set;

My motivation is that these can perform somewhat better e.g. with an
array (for circular_buffer), or auto_buffer (for flat_set/flat_map).
I think even some very simply array wrapper would be useable with
flat_set.

The EA STL implementation has this features.

What do you think?

-Thorsten


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