Boost logo

Boost :

Subject: Re: [boost] Boost.Containers? (WAS Re: Proposal: Monotonic Containers - Comparison with boost::pool, boost::fast_pool and TBB)
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-06-24 15:48:16


Dean Michael Berris wrote:
> On Wed, Jun 24, 2009 at 10:40 AM, Christian
> Schladetsch<christian.schladetsch_at_[hidden]> wrote:
>> What do people think of moving boost::interprocess::containers to
>> boost::containers? These containers are not really specific to interprocess?
>>
>
> I think this can easily be done through 'using' declarations:
>
> namespace boost {
> namespace containers {
> using boost::interprocess::list;
> using boost::interprocess::vector;
> /* ... */
> }
> }

All the work to decouple Boost containers from Interprocess is already
done, except for move header <boost/interprocess/detail/move.hpp>. A
quick find/replace exercise can put all these containers in
boost/container without any dependence on boost/interprocess (we should
put move emulation in boost move).

Implementations of all Interprocess containers are now here:

boost/interprocess/containers/container/

in the boost::interprocess_containers namespace

Headers in boost/interprocess/containers just include previous headers
implementation and hey have using declarations (e.g.
boost/interprocess/containers/list.hpp):

#ifndef BOOST_INTERPROCESS_CONTAINERS_LIST_HPP
#define BOOST_INTERPROCESS_CONTAINERS_LIST_HPP

#if (defined _MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/containers/container/list.hpp>

namespace boost {
namespace interprocess {

using boost::interprocess_container::list;

} //namespace interprocess {
} //namespace boost {

#include <boost/interprocess/detail/config_end.hpp>

#endif // #ifndef BOOST_INTERPROCESS_CONTAINERS_LIST_HPP

> I don't think it should move though to support earlier applications
> that are already using the interprocess namespace for the containers.

All the work to maintain backwards compatibility is done, we just need
to find/replace some includes and namespaces. I have already done the
exercise with an slightly older version of containers for Boost.Move:

https://svn.boost.org/trac/boost/browser/sandbox/move/boost/container

My opinion is that containers should go to boost/container. All the
dirty work is already done ;-)

Best,

Ion


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