Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75065 - in sandbox/utility-container_gen: boost/utility libs/utility/container_gen/doc libs/utility/container_gen/doc/html libs/utility/container_gen/doc/html/container_gen libs/utility/container_gen/doc/html/container_gen/reference libs/utility/container_gen/example
From: sponage_at_[hidden]
Date: 2011-10-19 13:32:22


Author: expaler
Date: 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
New Revision: 75065
URL: http://svn.boost.org/trac/boost/changeset/75065

Log:
Boost.Utility.ContainerGen: added ptr_container_gen metafunction and ptr_associative_container_gen metafunction class.
Added:
   sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/container_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/ptr_assoc_container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/ptr_container_gen.hpp (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_assoc_cont_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_container_gen.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_assoc_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_container_gen.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/example/output_char_tallies.cpp (contents, props changed)
   sandbox/utility-container_gen/libs/utility/container_gen/example/output_shape_stats.cpp (contents, props changed)

Added: sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,395 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <set>
+#include <map>
+#include <boost/mpl/if.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/tr1/unordered_map.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/utility/container_selector.hpp>
+
+#if !defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS && BOOST_VERSION >= 104800
+#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#endif
+
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#include <boost/mpl/eval_if.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+#endif
+
+//[reference__associative_container_gen
+namespace boost {
+
+ template <typename Selector>
+ struct associative_container_gen
+ {
+//<-
+#if 0
+//->
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ // typedef ... type;
+ };
+//<-
+#endif
+//->
+ };
+
+ //<-
+ template <>
+ struct associative_container_gen<setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key,::boost::detail::range_less>
+ , ::std::map<Key,Mapped,::boost::detail::range_less>
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key,::boost::detail::range_less>
+ , ::std::map<Key,Mapped,::boost::detail::range_less>
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::set<Key>
+ , ::std::map<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key,::boost::detail::range_less>
+ , ::std::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key,::boost::detail::range_less>
+ , ::std::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::multiset<Key>
+ , ::std::multimap<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<Key,::boost::hash<Key> >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_ASSOCIATIVE_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/container_gen.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,279 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011 Cromwell D. Enage
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole,
+// Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/utility/container_selector.hpp>
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/functional/hash.hpp>
+
+#if !defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS && BOOST_VERSION >= 104800
+#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#endif
+
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#include <boost/mpl/if.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+#endif
+
+//[reference__container_gen__list_specialization
+namespace boost {
+
+ //<-
+ template <typename Selector, typename ValueType>
+ struct container_gen
+ {
+ };
+
+ template <typename ValueType>
+ struct container_gen<vecS,ValueType>
+ {
+ typedef ::std::vector<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<dequeS,ValueType>
+ {
+ typedef ::std::deque<ValueType> type;
+ };
+ //->
+
+ template <typename ValueType>
+ struct container_gen<listS,ValueType>
+ {
+ typedef ::std::list<ValueType> type;
+ };
+
+ //<-
+#if !defined BOOST_NO_SLIST
+ template <typename ValueType>
+ struct container_gen<slistS,ValueType>
+ {
+ typedef ::BOOST_STD_EXTENSION_NAMESPACE::slist<ValueType> type;
+ };
+#endif
+
+ template <typename ValueType>
+ struct container_gen<setS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+#else
+ typedef ::std::set<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<mapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+#else
+ typedef ::std::set<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<multisetS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+#else
+ typedef ::std::multiset<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<multimapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+#else
+ typedef ::std::multiset<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_setS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_mapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multisetS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multimapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::std::tr1::unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+ //->
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //===========================================================================
+ // The main container_gen traits class uses partial specialization,
+ // so we also include a workaround.
+ //===========================================================================
+
+//[reference__container_gen
+namespace boost {
+
+ template <typename Selector, typename ValueType>
+ struct container_gen
+ {
+ //<-
+ typedef typename container_selector<Selector>::type
+ Select;
+ typedef typename Select::BOOST_NESTED_TEMPLATE bind_<ValueType>::type
+ type;
+ //->
+ // typedef .... type;
+ };
+} // namespace boost
+//]
+
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_UTILITY_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/container_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/container_selector.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,393 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011 Cromwell D. Enage
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole,
+// Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+ //===========================================================================
+ // Selectors for the VertexList and EdgeList template parameters of
+ // adjacency_list, and the container_gen traits class which is used
+ // to map the selectors to the container type used to implement the
+ // graph.
+ //===========================================================================
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+//[reference__container_selectors
+namespace boost {
+
+#if !defined BOOST_NO_SLIST
+ struct slistS { };
+#endif
+
+ struct vecS { };
+ struct dequeS { };
+ struct listS { };
+ struct setS { };
+ struct mapS { };
+ struct multisetS { };
+ struct multimapS { };
+ struct hash_setS { };
+ struct hash_mapS { };
+ struct hash_multisetS { };
+ struct hash_multimapS { };
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/functional/hash.hpp>
+
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/ptr_container/ptr_deque.hpp>
+#include <boost/ptr_container/ptr_list.hpp>
+#include <boost/ptr_container/ptr_set.hpp>
+#include <boost/ptr_container/ptr_map.hpp>
+#include <boost/ptr_container/ptr_unordered_set.hpp>
+#include <boost/ptr_container/ptr_unordered_map.hpp>
+
+#if !defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS && BOOST_VERSION >= 104800
+#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#endif
+
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#include <boost/mpl/if.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+#endif
+
+namespace boost {
+
+#if !defined BOOST_NO_SLIST
+ struct slistS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::BOOST_STD_EXTENSION_NAMESPACE::slist<T> type;
+ };
+ };
+#endif
+
+ struct vecS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::vector<T> type;
+ typedef ::boost::ptr_vector<T> ptr_type;
+ };
+ };
+
+ struct dequeS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::deque<T> type;
+ typedef ::boost::ptr_deque<T> ptr_type;
+ };
+ };
+
+ struct listS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::std::list<T> type;
+ typedef ::boost::ptr_list<T> ptr_type;
+ };
+ };
+
+ struct setS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::set<T,::boost::detail::range_less>
+ , ::std::set<T>
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_set<T,::boost::detail::range_less>
+ , ::boost::ptr_set<T>
+ >::type
+ ptr_type;
+#else
+ typedef ::std::set<T> type;
+ typedef ::boost::ptr_set<T> ptr_type;
+#endif
+ };
+ };
+
+ struct mapS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::set<T,::boost::detail::range_less>
+ , ::std::set<T>
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_set<T,::boost::detail::range_less>
+ , ::boost::ptr_set<T>
+ >::type
+ ptr_type;
+#else
+ typedef ::std::set<T> type;
+ typedef ::boost::ptr_set<T> ptr_type;
+#endif
+ };
+ };
+
+ struct multisetS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::multiset<T,::boost::detail::range_less>
+ , ::std::multiset<T>
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_multiset<T,::boost::detail::range_less>
+ , ::boost::ptr_multiset<T>
+ >::type
+ ptr_type;
+#else
+ typedef ::std::multiset<T> type;
+ typedef ::boost::ptr_multiset<T> ptr_type;
+#endif
+ };
+ };
+
+ struct multimapS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::multiset<T,::boost::detail::range_less>
+ , ::std::multiset<T>
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_multiset<T,::boost::detail::range_less>
+ , ::boost::ptr_multiset<T>
+ >::type
+ ptr_type;
+#else
+ typedef ::std::multiset<T> type;
+ typedef ::boost::ptr_multiset<T> ptr_type;
+#endif
+ };
+ };
+
+ struct hash_setS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<T,::boost::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_set<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<T,::boost::hash<T> >
+ >::type
+ ptr_type;
+#else
+ typedef ::std::tr1::unordered_set<T,::boost::hash<T> > type;
+ typedef ::boost::ptr_unordered_set<T,::boost::hash<T> > ptr_type;
+#endif
+ };
+ };
+
+ struct hash_mapS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_set<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<T,::boost::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_set<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<T,::boost::hash<T> >
+ >::type
+ ptr_type;
+#else
+ typedef ::std::tr1::unordered_set<T,::boost::hash<T> > type;
+ typedef ::boost::ptr_unordered_set<T,::boost::hash<T> > ptr_type;
+#endif
+ };
+ };
+
+ struct hash_multisetS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_multiset<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<T,::boost::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_multiset<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<T,::boost::hash<T> >
+ >::type
+ ptr_type;
+#else
+ typedef ::std::tr1::unordered_multiset<T,::boost::hash<T> >
+ type;
+ typedef ::boost::ptr_unordered_multiset<T,::boost::hash<T> >
+ ptr_type;
+#endif
+ };
+ };
+
+ struct hash_multimapS
+ {
+ template <typename T>
+ struct bind_
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_multiset<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<T,::boost::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_multiset<
+ T
+ , ::boost::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<T,::boost::hash<T> >
+ >::type
+ ptr_type;
+#else
+ typedef ::std::tr1::unordered_multiset<T,::boost::hash<T> >
+ type;
+ typedef ::boost::ptr_unordered_multiset<T,::boost::hash<T> >
+ ptr_type;
+#endif
+ };
+ };
+
+ template <typename Selector>
+ struct container_selector
+ {
+ typedef vecS type;
+ };
+
+#define BOOST_CONTAINER_SELECTOR(NAME) \
+ template <> struct container_selector<NAME> { typedef NAME type; }
+
+ BOOST_CONTAINER_SELECTOR(vecS);
+ BOOST_CONTAINER_SELECTOR(dequeS);
+ BOOST_CONTAINER_SELECTOR(listS);
+ BOOST_CONTAINER_SELECTOR(setS);
+ BOOST_CONTAINER_SELECTOR(mapS);
+ BOOST_CONTAINER_SELECTOR(multisetS);
+ BOOST_CONTAINER_SELECTOR(multimapS);
+ BOOST_CONTAINER_SELECTOR(hash_setS);
+ BOOST_CONTAINER_SELECTOR(hash_mapS);
+#if !defined BOOST_NO_SLIST
+ BOOST_CONTAINER_SELECTOR(slistS);
+#endif
+
+#undef BOOST_CONTAINER_SELECTOR
+
+} // namespace boost
+
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_UTILITY_CONTAINER_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_random_access_selector.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,44 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_random_access_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_random_access_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_random_access_selector,(Selector))
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_random_access_selector<vecS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<dequeS> : ::boost::mpl::true_
+ {
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_unique_assoc_selector.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,56 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_unique_associative_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_unique_associative_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(
+ 1
+ , is_unique_associative_selector
+ , (Selector)
+ )
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_unique_associative_selector<setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<mapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<hash_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<hash_mapS> : ::boost::mpl::true_
+ {
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/ptr_assoc_container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/ptr_assoc_container_gen.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,415 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_PTR_ASSOC_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_PTR_ASSOC_CONTAINER_GEN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/ptr_container/ptr_set.hpp>
+#include <boost/ptr_container/ptr_map.hpp>
+#include <boost/ptr_container/ptr_unordered_set.hpp>
+#include <boost/ptr_container/ptr_unordered_map.hpp>
+#include <boost/utility/container_selector.hpp>
+
+#if !defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS && BOOST_VERSION >= 104800
+#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#endif
+
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#include <boost/mpl/eval_if.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+#endif
+
+//[reference__ptr_associative_container_gen
+namespace boost {
+
+ template <typename Selector>
+ struct ptr_associative_container_gen
+ {
+//<-
+#if 0
+//->
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ // typedef ... type;
+ };
+//<-
+#endif
+//->
+ };
+
+ //<-
+ template <>
+ struct ptr_associative_container_gen<setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key,::boost::detail::range_less>
+ , ::boost::ptr_map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key>
+ , ::boost::ptr_map<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key>
+ , ::boost::ptr_map<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key,::boost::detail::range_less>
+ , ::boost::ptr_map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key>
+ , ::boost::ptr_map<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_set<Key>
+ , ::boost::ptr_map<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<Key>
+ , ::boost::ptr_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<Key>
+ , ::boost::ptr_multimap<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<Key>
+ , ::boost::ptr_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_multiset<Key>
+ , ::boost::ptr_multimap<Key,Mapped>
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<Key,::boost::hash<Key> >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<Key,::boost::hash<Key> >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<Key,::boost::hash<Key> >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<Key,::boost::hash<Key> >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >
+ >::type
+ type;
+#else
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::boost::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::boost::hash<Key>
+ >
+ >::type
+ type;
+#endif
+ };
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_PTR_ASSOC_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/ptr_container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/ptr_container_gen.hpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,272 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011 Cromwell D. Enage
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole,
+// Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+
+#ifndef BOOST_UTILITY_PTR_CONTAINER_GEN_HPP_INCLUDED
+#define BOOST_UTILITY_PTR_CONTAINER_GEN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/utility/container_selector.hpp>
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#include <boost/functional/hash.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/ptr_container/ptr_deque.hpp>
+#include <boost/ptr_container/ptr_list.hpp>
+#include <boost/ptr_container/ptr_set.hpp>
+#include <boost/ptr_container/ptr_map.hpp>
+#include <boost/ptr_container/ptr_unordered_set.hpp>
+#include <boost/ptr_container/ptr_unordered_map.hpp>
+
+#if !defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS && BOOST_VERSION >= 104800
+#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#endif
+
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+#include <boost/mpl/if.hpp>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+#endif
+
+//[reference__ptr_container_gen__list_specialization
+namespace boost {
+
+ //<-
+ template <typename Selector, typename ValueType>
+ struct ptr_container_gen
+ {
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<vecS,ValueType>
+ {
+ typedef ::boost::ptr_vector<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<dequeS,ValueType>
+ {
+ typedef ::boost::ptr_deque<ValueType> type;
+ };
+ //->
+
+ template <typename ValueType>
+ struct ptr_container_gen<listS,ValueType>
+ {
+ typedef ::boost::ptr_list<ValueType> type;
+ };
+
+ //<-
+ template <typename ValueType>
+ struct ptr_container_gen<setS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_set<ValueType,::boost::detail::range_less>
+ , ::boost::ptr_set<ValueType>
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_set<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<mapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_set<ValueType,::boost::detail::range_less>
+ , ::boost::ptr_set<ValueType>
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_set<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<multisetS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multiset<ValueType>
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_multiset<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<multimapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multiset<ValueType>
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_multiset<ValueType> type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_setS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_mapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_unordered_set<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_multisetS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_multimapS,ValueType>
+ {
+#if defined BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ >::type
+ type;
+#else
+ typedef ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::boost::hash<ValueType>
+ >
+ type;
+#endif
+ };
+ //->
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //===========================================================================
+ // The main ptr_container_gen traits class uses partial specialization,
+ // so we also include a workaround.
+ //===========================================================================
+
+//[reference__ptr_container_gen
+namespace boost {
+
+ template <typename Selector, typename ValueType>
+ struct ptr_container_gen
+ {
+ //<-
+ typedef typename container_selector<Selector>::type
+ Select;
+ typedef typename Select::BOOST_NESTED_TEMPLATE bind_<
+ ValueType
+ >::ptr_type
+ type;
+ //->
+ // typedef .... type;
+ };
+} // namespace boost
+//]
+
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif // BOOST_UTILITY_PTR_CONTAINER_GEN_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/container_gen.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,85 @@
+[library container_gen
+ [quickbook 1.5]
+ [version 0.1]
+ [authors [Lumsdaine, Andrew][Lee, Lie-Quan][Claveirole, Thomas][Siek, Jeremy G.][Enage, Cromwell D.]]
+ [copyright 1997-2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole, Jeremy G. Siek, Cromwell D. Enage]
+ [purpose Collection of container-generating metafunctions]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[/ General concept links.]
+[def __Random_Access_Container__ [@http://www.sgi.com/tech/stl/RandomAccessContainer.html [*Random Access Container]]]
+[def __Associative_Container__ [@http://www.sgi.com/tech/stl/AssociativeContainer.html [*Associative Container]]]
+[def __Unique_Associative_Container__ [@http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html [*Unique Associative Container]]]
+
+[/ STL reference links.]
+[def __std_list__ [@http://www.sgi.com/tech/stl/List.html `std::list`]]
+[def _std_string_ [@http://www.sgi.com/tech/stl/basic_string.html std::string]]
+
+[/ Boost library links.]
+[def __Boost_Utility__ [@boost:libs/utility/index.html [*Boost.Utility]]]
+[def __Boost_Pointer_Container__ [@boost:libs/ptr_container/doc/index.html [*Boost.PointerContainer]]]
+[def __BGL__ [@boost:libs/graph/doc/index.html BGL]]
+[def __SVN_Trac__ [@http://svn.boost.org/ SVN Trac]]
+[def __Boost_Type_Traits_Operators__ [@http://svn.boost.org/svn/boost/sandbox/type_traits/libs/type_traits/doc/html/index.html [*Boost.TypeTraitsOperators]]]
+
+[/ Boost reference links.]
+[def _mpl_apply_wrap1_ [@boost:libs/mpl/doc/refmanual/apply-wrap.html boost::mpl::apply_wrap1]]
+[def _mpl_apply_wrap2_ [@boost:libs/mpl/doc/refmanual/apply-wrap.html boost::mpl::apply_wrap2]]
+[def __mpl_true__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`]]
+[def __mpl_false__ [@boost:libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`]]
+[def __graph_adjacency_list__ [@boost:libs/graph/doc/adjacency_list.html `boost::adjacency_list`]]
+[def __graph_parallel_edge_traits__ [@boost:libs/graph/doc/using_adjacency_list.html#SECTION00834200000000000000 `boost::parallel_edge_traits`]]
+
+[/ Boost.Utility.ContainerGen reference header file links.]
+[def __boost_utility_container_selector_hpp__ [@../../../../../boost/utility/container_selector.hpp boost/utility/container_selector.hpp]]
+[def __boost_utility_is_random_access_selector_hpp__ [@../../../../../boost/utility/is_random_access_selector.hpp boost/utility/is_random_access_selector.hpp]]
+[def __boost_utility_is_unique_assoc_selector_hpp__ [@../../../../../boost/utility/is_unique_assoc_selector.hpp boost/utility/is_unique_assoc_selector.hpp]]
+[def __boost_utility_container_gen_hpp__ [@../../../../../boost/utility/container_gen.hpp boost/utility/container_gen.hpp]]
+[def __boost_utility_ptr_container_gen_hpp__ [@../../../../../boost/utility/ptr_container_gen.hpp boost/utility/ptr_container_gen.hpp]]
+[def __boost_utility_associative_container_gen_hpp__ [@../../../../../boost/utility/associative_container_gen.hpp boost/utility/associative_container_gen.hpp]]
+[def __boost_utility_ptr_assoc_container_gen_hpp__ [@../../../../../boost/utility/ptr_assoc_container_gen.hpp boost/utility/ptr_assoc_container_gen.hpp]]
+
+[/ Boost.Utility.ContainerGen reference links.]
+[def __container_gen__ [link container_gen.reference.container_gen `container_gen`]]
+[def _container_gen_ [link container_gen.reference.container_gen container_gen]]
+[def __ptr_container_gen__ [link container_gen.reference.ptr_container_gen `ptr_container_gen`]]
+[def _ptr_container_gen_ [link container_gen.reference.ptr_container_gen ptr_container_gen]]
+[def __associative_container_gen__ [link container_gen.reference.associative_container_gen `associative_container_gen`]]
+[def _associative_container_gen_ [link container_gen.reference.associative_container_gen associative_container_gen]]
+[def __ptr_associative_container_gen__ [link container_gen.reference.ptr_assoc_cont_gen `ptr_associative_container_gen`]]
+[def _ptr_associative_container_gen_ [link container_gen.reference.ptr_assoc_cont_gen ptr_associative_container_gen]]
+[def __is_random_access_selector__ [link container_gen.reference.is_random_access_selector `is_random_access_selector`]]
+[def _is_random_access_selector_ [link container_gen.reference.is_random_access_selector is_random_access_selector]]
+[def __is_unique_associative_selector__ [link container_gen.reference.is_unique_associative_selector `is_unique_associative_selector`]]
+[def _is_unique_associative_selector_ [link container_gen.reference.is_unique_associative_selector is_unique_associative_selector]]
+
+[/ Autogenerate reference documentation directly from code.]
+[/ Bypass Doxygen.]
+[import ../../../../boost/utility/container_selector.hpp]
+[import ../../../../boost/utility/is_random_access_selector.hpp]
+[import ../../../../boost/utility/is_unique_assoc_selector.hpp]
+[import ../../../../boost/utility/container_gen.hpp]
+[import ../../../../boost/utility/ptr_container_gen.hpp]
+[import ../../../../boost/utility/associative_container_gen.hpp]
+[import ../../../../boost/utility/ptr_assoc_container_gen.hpp]
+[import ../../../../libs/graph/example/container_gen.cpp]
+[import ../../../../libs/utility/container_gen/example/output_shape_stats.cpp]
+[import ../../../../libs/utility/container_gen/example/output_char_tallies.cpp]
+
+[/ index.html Start]
+
+[heading Rationale]
+Significant interest was expressed in moving the `container_gen` metafunction
+from its current place in the __BGL__ to a more general residence such as
+__Boost_Utility__. The relevant discussion is archived here:
+[@http://lists.boost.org/Archives/boost/2011/05/181573.php].
+
+[/ index.html End]
+
+[include reference.qbk]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,44 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="prev" href="../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="next" href="reference/container_gen.html" title="container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/container_gen.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="container_gen.reference"></a><a class="link" href="reference.html" title="Reference">Reference</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="special">*</span> <a class="link" href="reference/container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/ptr_container_gen.html" title="ptr_container_gen"><code class="computeroutput"><span class="identifier">ptr_container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/associative_container_gen.html" title="associative_container_gen"><code class="computeroutput"><span class="identifier">associative_container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/ptr_assoc_cont_gen.html" title="ptr_associative_container_gen"><code class="computeroutput"><span class="identifier">ptr_associative_container_gen</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/is_random_access_selector.html" title="is_random_access_selector"><code class="computeroutput"><span class="identifier">is_random_access_selector</span></code></a>
+<span class="special">*</span> <a class="link" href="reference/is_unique_associative_selector.html" title="is_unique_associative_selector"><code class="computeroutput"><span class="identifier">is_unique_associative_selector</span></code></a>
+</pre>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference/container_gen.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/associative_container_gen.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,182 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>associative_container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="ptr_container_gen.html" title="ptr_container_gen">
+<link rel="next" href="ptr_assoc_cont_gen.html" title="ptr_associative_container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ptr_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="ptr_assoc_cont_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.associative_container_gen"></a><a class="link" href="associative_container_gen.html" title="associative_container_gen"><code class="computeroutput"><span class="identifier">associative_container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.synopsis"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">associative_container_gen</span>
+ <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Mapped</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">apply</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef ... type;
+</span> <span class="special">};</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.description"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This metafunction class can be used to determine the appropriate associative
+ container type given the specified selector. The example routine below
+ uses the <code class="computeroutput"><span class="identifier">associative_container_gen</span></code>
+ return type to associate each distinct string character with the number
+ of times it appears in the string.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">output_char_tallies</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">str</span><span class="special">,</span> <span class="identifier">Selector</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">apply_wrap2</span><span class="special">&lt;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">associative_container_gen</span><span class="special">&lt;</span><span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="special">,</span> <span class="keyword">char</span>
+ <span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>
+ <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">FrequencyTable</span><span class="special">;</span>
+
+ <span class="identifier">FrequencyTable</span> <span class="identifier">freq_table</span><span class="special">;</span>
+ <span class="keyword">char</span> <span class="identifier">reverse_counter</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+ <span class="keyword">for</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">str</span><span class="special">.</span><span class="identifier">size</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="keyword">typename</span> <span class="identifier">FrequencyTable</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">ft_itr</span> <span class="special">=</span> <span class="identifier">freq_table</span><span class="special">.</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">str</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
+
+ <span class="keyword">if</span> <span class="special">(</span><span class="identifier">ft_itr</span> <span class="special">==</span> <span class="identifier">freq_table</span><span class="special">.</span><span class="identifier">end</span><span class="special">())</span>
+ <span class="special">{</span>
+ <span class="identifier">freq_table</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">FrequencyTable</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">(</span><span class="identifier">str</span><span class="special">[</span><span class="identifier">i</span><span class="special">],</span> <span class="number">1</span><span class="special">));</span>
+ <span class="special">}</span>
+ <span class="keyword">else</span>
+ <span class="special">{</span>
+ <span class="special">++</span><span class="identifier">ft_itr</span><span class="special">-&gt;</span><span class="identifier">second</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="special">}</span>
+
+ <span class="keyword">for</span> <span class="special">(</span>
+ <span class="keyword">typename</span> <span class="identifier">FrequencyTable</span><span class="special">::</span><span class="identifier">const_iterator</span> <span class="identifier">ft_itr</span> <span class="special">=</span> <span class="identifier">freq_table</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">ft_itr</span> <span class="special">!=</span> <span class="identifier">freq_table</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span>
+ <span class="special">++</span><span class="identifier">ft_itr</span>
+ <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">ft_itr</span><span class="special">-&gt;</span><span class="identifier">first</span> <span class="special">&lt;&lt;</span> <span class="string">": "</span> <span class="special">&lt;&lt;</span> <span class="identifier">ft_itr</span><span class="special">-&gt;</span><span class="identifier">second</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ This library provides specializations of this metafunction class for each
+ selector it provides whose resulting storage type models the Associative Container concept. Here, two
+ such selectors are passed in calls to the example routine.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">**)</span>
+<span class="special">{</span>
+ <span class="identifier">output_char_tallies</span><span class="special">(</span><span class="string">"abacadabra"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">hash_mapS</span><span class="special">());</span>
+ <span class="identifier">output_char_tallies</span><span class="special">(</span><span class="string">"loolapalooza"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">multimapS</span><span class="special">());</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ It is possible to nest containers via <code class="computeroutput"><span class="identifier">associative_container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> boost::mpl::apply_wrap2<span class="special">&lt;</span>
+ <span class="identifier">associative_container_gen</span><span class="special">&lt;</span><span class="identifier">mapS</span><span class="special">&gt;</span>
+ <span class="special">,</span> boost::mpl::apply_wrap1<span class="special">&lt;</span><span class="identifier">associative_container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">&gt;,</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> std::string
+ <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">MapOfCharSets2Strings</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ This last capability depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac, add the <code class="computeroutput"><span class="identifier">type_traits</span></code>
+ module to your list of header directories, and <code class="computeroutput"><span class="preprocessor">#define</span>
+ <span class="identifier">BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS</span></code>
+ in order to obtain this capability.
+ </p>
+<p>
+ If you do not need this capability, then you do not need Boost.TypeTraitsOperators.
+ </p>
+</td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.associative_container_gen.definition"></a><a class="link" href="associative_container_gen.html#container_gen.reference.associative_container_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/associative_container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ptr_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="ptr_assoc_cont_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/container_gen.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,184 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="../reference.html" title="Reference">
+<link rel="next" href="ptr_container_gen.html" title="ptr_container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="ptr_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.container_gen"></a><a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.synopsis"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef .... type;
+</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.description"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::adjacency_list class template
+ uses this metafunction to map the <code class="computeroutput"><span class="identifier">OutEdgeList</span></code>
+ and <code class="computeroutput"><span class="identifier">VertexList</span></code> selectors
+ to the actual container types used for the graph storage. This library
+ provides specializations of this metafunction for each selector it defines.
+ Here are the selector definitions:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+<span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span> <span class="identifier">BOOST_NO_SLIST</span>
+ <span class="keyword">struct</span> <span class="identifier">slistS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="keyword">struct</span> <span class="identifier">vecS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">dequeS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">listS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multimapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multimapS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ The specialization for the <code class="computeroutput"><span class="identifier">listS</span></code>
+ selector is shown here.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">listS</span><span class="special">,</span><span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ To use some other container of your choice, or to supply more template
+ arguments to a standard container than just <code class="computeroutput"><span class="identifier">ValueType</span></code>,
+ define a selector class and then specialize this metafunction for your
+ selector. In the code below we show how to create a selector that lets
+ you specify the allocator to be used with the std::list.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">list_with_allocatorS</span> <span class="special">{</span> <span class="special">};</span>
+
+<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">list_with_allocatorS</span><span class="special">&lt;</span><span class="identifier">Alloc</span><span class="special">&gt;,</span><span class="identifier">ValueType</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Alloc</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">rebind</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">&gt;::</span><span class="identifier">other</span> <span class="identifier">Allocator</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+<span class="special">}</span>
+
+<span class="comment">// now you can define a graph using std::list and a specific allocator
+</span><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">adjacency_list</span><span class="special">&lt;</span> <span class="identifier">list_with_allocatorS</span><span class="special">&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;,</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">vecS</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">directedS</span><span class="special">&gt;</span> <span class="identifier">MyGraph</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ It is possible to nest associative containers via <code class="computeroutput"><span class="identifier">container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="identifier">container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">SetOfSetsOfIntegers</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ This last capability depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac, add the <code class="computeroutput"><span class="identifier">type_traits</span></code>
+ module to your list of header directories, and <code class="computeroutput"><span class="preprocessor">#define</span>
+ <span class="identifier">BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS</span></code>
+ in order to obtain this capability.
+ </p>
+<p>
+ If you do not need this capability, then you do not need Boost.TypeTraitsOperators.
+ </p>
+</td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.container_gen.definition"></a><a class="link" href="container_gen.html#container_gen.reference.container_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="ptr_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_random_access_selector.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,86 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>is_random_access_selector</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="ptr_assoc_cont_gen.html" title="ptr_associative_container_gen">
+<link rel="next" href="is_unique_associative_selector.html" title="is_unique_associative_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ptr_assoc_cont_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_unique_associative_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.is_random_access_selector"></a><a class="link" href="is_random_access_selector.html" title="is_random_access_selector"><code class="computeroutput"><span class="identifier">is_random_access_selector</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.synopsis"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_random_access_selector</span> <span class="special">:</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span>
+ <span class="special">{</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.description"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::adjacency_list class template
+ uses this metafunction to determine whether or not it will provide an internal
+ property map that associates its vertex descriptors with unique indices.
+ Returns boost::mpl::true_ if the storage type will
+ model the Random Access Container concept, boost::mpl::false_
+ otherwise.
+ </p>
+<p>
+ Specialize this metafunction to return boost::mpl::true_ for your custom selector
+ if and only if the storage type to be returned by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> models the Random Access Container concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_random_access_selector.definition"></a><a class="link" href="is_random_access_selector.html#container_gen.reference.is_random_access_selector.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/is_random_access_selector.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="ptr_assoc_cont_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_unique_associative_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/is_unique_associative_selector.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,87 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>is_unique_associative_selector</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="is_random_access_selector.html" title="is_random_access_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="is_random_access_selector.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.is_unique_associative_selector"></a><a class="link" href="is_unique_associative_selector.html" title="is_unique_associative_selector"><code class="computeroutput"><span class="identifier">is_unique_associative_selector</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.synopsis"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">is_unique_associative_selector</span> <span class="special">:</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span>
+ <span class="special">{</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.description"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ The boost::parallel_edge_traits metafunction
+ uses this metafunction to specify whether or not the storage type returned
+ by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> will allow parallel
+ edges--that is, if the storage type will <span class="bold"><strong>not</strong></span>
+ model the Unique Associative Container concept. Returns
+ boost::mpl::true_
+ if the storage type <span class="bold"><strong>will</strong></span> model the Unique Associative Container concept, boost::mpl::false_
+ otherwise.
+ </p>
+<p>
+ Specialize this metafunction to return boost::mpl::true_ for your custom selector
+ if and only if the storage type to be returned by <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> models the Unique Associative Container concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.is_unique_associative_selector.definition"></a><a class="link" href="is_unique_associative_selector.html#container_gen.reference.is_unique_associative_selector.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/is_unique_assoc_selector.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="is_random_access_selector.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_assoc_cont_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_assoc_cont_gen.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,117 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>ptr_associative_container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="associative_container_gen.html" title="associative_container_gen">
+<link rel="next" href="is_random_access_selector.html" title="is_random_access_selector">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_random_access_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.ptr_assoc_cont_gen"></a><a class="link" href="ptr_assoc_cont_gen.html" title="ptr_associative_container_gen"><code class="computeroutput"><span class="identifier">ptr_associative_container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_assoc_cont_gen.synopsis"></a><a class="link" href="ptr_assoc_cont_gen.html#container_gen.reference.ptr_assoc_cont_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">ptr_associative_container_gen</span>
+ <span class="special">{</span>
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Key</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Mapped</span> <span class="special">=</span> <span class="keyword">void</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">apply</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef ... type;
+</span> <span class="special">};</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_assoc_cont_gen.description"></a><a class="link" href="ptr_assoc_cont_gen.html#container_gen.reference.ptr_assoc_cont_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ TODO
+ </p>
+<p>
+ It is possible to nest containers via <code class="computeroutput"><span class="identifier">ptr_associative_container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> boost::mpl::apply_wrap2<span class="special">&lt;</span>
+ <span class="identifier">ptr_associative_container_gen</span><span class="special">&lt;</span><span class="identifier">mapS</span><span class="special">&gt;</span>
+ <span class="special">,</span> boost::mpl::apply_wrap1<span class="special">&lt;</span><span class="identifier">ptr_associative_container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">&gt;,</span><span class="keyword">char</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="special">,</span> std::string
+ <span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">MapOfCharSets2Strings</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ This last capability depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac, add the <code class="computeroutput"><span class="identifier">type_traits</span></code>
+ module to your list of header directories, and <code class="computeroutput"><span class="preprocessor">#define</span>
+ <span class="identifier">BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS</span></code>
+ in order to obtain this capability.
+ </p>
+<p>
+ If you do not need this capability, then you do not need Boost.TypeTraitsOperators.
+ </p>
+</td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_assoc_cont_gen.definition"></a><a class="link" href="ptr_assoc_cont_gen.html#container_gen.reference.ptr_assoc_cont_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/ptr_assoc_container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="associative_container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="is_random_access_selector.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_container_gen.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/container_gen/reference/ptr_container_gen.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,297 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>ptr_container_gen</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="up" href="../reference.html" title="Reference">
+<link rel="prev" href="container_gen.html" title="container_gen">
+<link rel="next" href="associative_container_gen.html" title="associative_container_gen">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="container_gen.reference.ptr_container_gen"></a><a class="link" href="ptr_container_gen.html" title="ptr_container_gen"><code class="computeroutput"><span class="identifier">ptr_container_gen</span></code></a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_container_gen.synopsis"></a><a class="link" href="ptr_container_gen.html#container_gen.reference.ptr_container_gen.synopsis" title="Synopsis">Synopsis</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Selector</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">ptr_container_gen</span>
+ <span class="special">{</span>
+ <span class="comment">// typedef .... type;
+</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_container_gen.description"></a><a class="link" href="ptr_container_gen.html#container_gen.reference.ptr_container_gen.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Analagous to the <a class="link" href="container_gen.html" title="container_gen"><code class="computeroutput"><span class="identifier">container_gen</span></code></a> metafunction, you
+ can use this one to easily select an appropriate Boost.PointerContainer type. Pointer containers
+ are ideal for storing heterogeneous items with a common base type, e.g.
+ shapes:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">my_shape</span>
+<span class="special">{</span>
+ <span class="keyword">virtual</span> <span class="special">~</span><span class="identifier">my_shape</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="keyword">virtual</span> <span class="keyword">double</span> <span class="identifier">compute_perimeter</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+
+ <span class="keyword">virtual</span> <span class="keyword">double</span> <span class="identifier">compute_area</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">};</span>
+
+<span class="keyword">class</span> <span class="identifier">your_square</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">my_shape</span>
+<span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">length</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">explicit</span> <span class="identifier">your_square</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">s</span> <span class="special">=</span> <span class="number">1.0</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">length</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_perimeter</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">length</span> <span class="special">*</span> <span class="number">4.0</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_area</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">length</span> <span class="special">*</span> <span class="identifier">length</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">class</span> <span class="identifier">your_circle</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">my_shape</span>
+<span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">radius</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="keyword">explicit</span> <span class="identifier">your_circle</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">r</span> <span class="special">=</span> <span class="number">1.0</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">radius</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_perimeter</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;()</span> <span class="special">*</span> <span class="identifier">radius</span> <span class="special">*</span> <span class="number">2.0</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_area</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">pi</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;()</span> <span class="special">*</span> <span class="identifier">radius</span> <span class="special">*</span> <span class="identifier">radius</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">class</span> <span class="identifier">some_right_triangle</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">my_shape</span>
+<span class="special">{</span>
+ <span class="keyword">double</span> <span class="identifier">base</span><span class="special">;</span>
+ <span class="keyword">double</span> <span class="identifier">height</span><span class="special">;</span>
+
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">some_right_triangle</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">double</span> <span class="identifier">h</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">base</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">height</span><span class="special">(</span><span class="identifier">h</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="identifier">some_right_triangle</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">base</span><span class="special">(</span><span class="number">1.0</span><span class="special">),</span> <span class="identifier">height</span><span class="special">(</span><span class="number">1.0</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_perimeter</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="identifier">sqrt</span><span class="special">(</span><span class="identifier">base</span> <span class="special">*</span> <span class="identifier">base</span> <span class="special">+</span> <span class="identifier">height</span> <span class="special">*</span> <span class="identifier">height</span><span class="special">)</span> <span class="special">+</span> <span class="identifier">base</span> <span class="special">+</span> <span class="identifier">height</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="keyword">double</span> <span class="identifier">compute_area</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">constants</span><span class="special">::</span><span class="identifier">half</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;()</span> <span class="special">*</span> <span class="identifier">base</span> <span class="special">*</span> <span class="identifier">height</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+<p>
+ </p>
+<p>
+ Algorithms that work on the standard containers also work on pointer containers
+ out of the box.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">add_perimeter</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">value</span><span class="special">,</span> <span class="identifier">my_shape</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">shape</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">shape</span><span class="special">.</span><span class="identifier">compute_perimeter</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">value</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">double</span> <span class="identifier">add_area</span><span class="special">(</span><span class="keyword">double</span> <span class="identifier">value</span><span class="special">,</span> <span class="identifier">my_shape</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">shape</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">shape</span><span class="special">.</span><span class="identifier">compute_area</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">value</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Shapes</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">output_shape_stats</span><span class="special">(</span><span class="identifier">Shapes</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">shapes</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Total perimeter length = "</span> <span class="special">&lt;&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span>
+ <span class="identifier">shapes</span>
+ <span class="special">,</span> <span class="number">0.0</span>
+ <span class="special">,</span> <span class="identifier">add_perimeter</span>
+ <span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Total area = "</span> <span class="special">&lt;&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span>
+ <span class="identifier">shapes</span>
+ <span class="special">,</span> <span class="number">0.0</span>
+ <span class="special">,</span> <span class="identifier">add_area</span>
+ <span class="special">)</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">ptr_container_gen</span></code> metafunction
+ allows you to programmatically swap out different pointer container types
+ using type selectors.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">char</span><span class="special">**)</span>
+<span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptr_container_gen</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">listS</span><span class="special">,</span><span class="identifier">my_shape</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">shapes</span><span class="special">;</span>
+
+ <span class="identifier">shapes</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="keyword">new</span> <span class="identifier">your_square</span><span class="special">());</span>
+ <span class="identifier">shapes</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="keyword">new</span> <span class="identifier">your_circle</span><span class="special">());</span>
+ <span class="identifier">shapes</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="keyword">new</span> <span class="identifier">some_right_triangle</span><span class="special">());</span>
+
+ <span class="identifier">output_shape_stats</span><span class="special">(</span><span class="identifier">shapes</span><span class="special">);</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ This library provides specializations of the <code class="computeroutput"><span class="identifier">ptr_container_gen</span></code>
+ metafunction for each selector it defines. Here are the selector definitions:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+<span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span> <span class="identifier">BOOST_NO_SLIST</span>
+ <span class="keyword">struct</span> <span class="identifier">slistS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="preprocessor">#endif</span>
+
+ <span class="keyword">struct</span> <span class="identifier">vecS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">dequeS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">listS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">multimapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_setS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_mapS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multisetS</span> <span class="special">{</span> <span class="special">};</span>
+ <span class="keyword">struct</span> <span class="identifier">hash_multimapS</span> <span class="special">{</span> <span class="special">};</span>
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ The specialization for the <code class="computeroutput"><span class="identifier">listS</span></code>
+ selector is shown here.
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
+
+
+ <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="keyword">struct</span> <span class="identifier">ptr_container_gen</span><span class="special">&lt;</span><span class="identifier">listS</span><span class="special">,</span><span class="identifier">ValueType</span><span class="special">&gt;</span>
+ <span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">ptr_list</span><span class="special">&lt;</span><span class="identifier">ValueType</span><span class="special">&gt;</span> <span class="identifier">type</span><span class="special">;</span>
+ <span class="special">};</span>
+
+<span class="special">}</span> <span class="comment">// namespace boost
+</span></pre>
+<p>
+ </p>
+<p>
+ It is possible to nest associative containers via <code class="computeroutput"><span class="identifier">ptr_container_gen</span></code>,
+ e.g.:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">ptr_container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="identifier">ptr_container_gen</span><span class="special">&lt;</span><span class="identifier">setS</span><span class="special">,</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;::</span><span class="identifier">type</span>
+ <span class="identifier">SetOfSetsOfIntegers</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ This last capability depends on Boost.TypeTraitsOperators, which has been
+ recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the SVN Trac, add the <code class="computeroutput"><span class="identifier">type_traits</span></code>
+ module to your list of header directories, and <code class="computeroutput"><span class="preprocessor">#define</span>
+ <span class="identifier">BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS</span></code>
+ in order to obtain this capability.
+ </p>
+<p>
+ If you do not need this capability, then you do not need Boost.TypeTraitsOperators.
+ </p>
+</td></tr>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="container_gen.reference.ptr_container_gen.definition"></a><a class="link" href="ptr_container_gen.html#container_gen.reference.ptr_container_gen.definition" title="Where defined">Where
+ defined</a>
+</h4></div></div></div>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span>boost/utility/ptr_container_gen.hpp<span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="container_gen.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="associative_container_gen.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/html/index.html 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter&#160;1.&#160;container_gen 0.1</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Chapter&#160;1.&#160;container_gen 0.1">
+<link rel="next" href="container_gen/reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="container_gen/reference.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="container_gen"></a>Chapter&#160;1.&#160;container_gen 0.1</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Andrew</span> <span class="surname">Lumsdaine</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Lie-Quan</span> <span class="surname">Lee</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Thomas</span> <span class="surname">Claveirole</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Jeremy G.</span> <span class="surname">Siek</span>
+</h3></div></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Cromwell D.</span> <span class="surname">Enage</span>
+</h3></div></div>
+<div><p class="copyright">Copyright &#169; 1997 -2011 Andrew Lumsdaine, Lie-Quan Lee, Thomas Claveirole,
+ Jeremy G. Siek, Cromwell D. Enage</p></div>
+<div><div class="legalnotice">
+<a name="idp13407328"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt><span class="section">Reference</span></dt></dl>
+</div>
+<a name="container_gen.rationale"></a><h3>
+<a name="idp13409504"></a>
+ <a class="link" href="index.html#container_gen.rationale">Rationale</a>
+ </h3>
+<p>
+ Significant interest was expressed in moving the <code class="computeroutput"><span class="identifier">container_gen</span></code>
+ metafunction from its current place in the BGL
+ to a more general residence such as Boost.Utility. The relevant discussion is archived
+ here: http://lists.boost.org/Archives/boost/2011/05/181573.php.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: October 19, 2011 at 15:53:20 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="container_gen/reference.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_assoc_container_gen.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,61 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:associative_container_gen `associative_container_gen`]
+
+[section Synopsis]
+[reference__associative_container_gen]
+[endsect]
+
+[section Description]
+This metafunction class can be used to determine the appropriate associative
+container type given the specified selector. The example routine below uses
+the `associative_container_gen` return type to associate each distinct string
+character with the number of times it appears in the string.
+
+[example__output_char_tallies__definition]
+
+This library provides specializations of this metafunction class for each
+selector it provides whose resulting storage type models the
+__Associative_Container__ concept. Here, two such selectors are passed in
+calls to the example routine.
+
+[example__output_char_tallies__calls]
+
+It is possible to nest containers via `associative_container_gen`, e.g.:
+
+``
+typedef _mpl_apply_wrap2_<
+ associative_container_gen<mapS>
+ , _mpl_apply_wrap1_<associative_container_gen<setS>,char>::type
+ , _std_string_
+ >::type
+ MapOfCharSets2Strings;
+``
+
+[important
+ This last capability depends on __Boost_Type_Traits_Operators__, which has
+ been recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__, add the `type_traits` module to your list of header
+ directories, and `#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS` in order
+ to obtain this capability.
+
+ If you do not need this capability, then you do not need
+ __Boost_Type_Traits_Operators__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_associative_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ associative_container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_container_gen.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,63 @@
+[/=============================================================================
+ Copyright (C) 2000-2001 Jeremy G. Siek
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:container_gen `container_gen`]
+
+[section Synopsis]
+[reference__container_gen]
+[endsect]
+
+[section Description]
+The __graph_adjacency_list__ class template uses this metafunction to map the
+`OutEdgeList` and `VertexList` selectors to the actual container types used for
+the graph storage. This library provides specializations of this metafunction
+for each selector it defines. Here are the selector definitions:
+
+[reference__container_selectors]
+
+The specialization for the `listS` selector is shown here.
+
+[reference__container_gen__list_specialization]
+
+To use some other container of your choice, or to supply more template
+arguments to a standard container than just `ValueType`, define a selector
+class and then specialize this metafunction for your selector. In the code
+below we show how to create a selector that lets you specify the allocator
+to be used with the __std_list__.
+
+[example__container_gen__list_with_allocator_selector]
+
+It is possible to nest associative containers via `container_gen`, e.g.:
+
+``
+typedef container_gen<setS,container_gen<setS,int>::type>::type
+ SetOfSetsOfIntegers;
+``
+
+[important
+ This last capability depends on __Boost_Type_Traits_Operators__, which has
+ been recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__, add the `type_traits` module to your list of header
+ directories, and `#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS` in order
+ to obtain this capability.
+
+ If you do not need this capability, then you do not need
+ __Boost_Type_Traits_Operators__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_rand_access_selector.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,34 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:is_random_access_selector `is_random_access_selector`]
+
+[section Synopsis]
+[reference__is_random_access_selector]
+[endsect]
+
+[section Description]
+The __graph_adjacency_list__ class template uses this metafunction to determine
+whether or not it will provide an internal property map that associates its
+vertex descriptors with unique indices. Returns __mpl_true__ if the storage
+type will model the __Random_Access_Container__ concept, __mpl_false__
+otherwise.
+
+Specialize this metafunction to return __mpl_true__ for your custom selector if
+and only if the storage type to be returned by __container_gen__ models the
+__Random_Access_Container__ concept.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_is_random_access_selector_hpp__>
+``
+[endsect]
+
+[endsect] [/ is_random_access_selector]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_is_unique_assoc_sel.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,35 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:is_unique_associative_selector `is_unique_associative_selector`]
+
+[section Synopsis]
+[reference__is_unique_associative_selector]
+[endsect]
+
+[section Description]
+The __graph_parallel_edge_traits__ metafunction uses this metafunction to
+specify whether or not the storage type returned by __container_gen__ will
+allow parallel edges--that is, if the storage type will *not* model the
+__Unique_Associative_Container__ concept. Returns __mpl_true__ if the storage
+type *will* model the __Unique_Associative_Container__ concept, __mpl_false__
+otherwise.
+
+Specialize this metafunction to return __mpl_true__ for your custom selector if
+and only if the storage type to be returned by __container_gen__ models the
+__Unique_Associative_Container__ concept.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_is_unique_assoc_selector_hpp__>
+``
+[endsect]
+
+[endsect] [/ is_unique_associative_selector]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_assoc_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_assoc_container_gen.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,49 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:ptr_assoc_cont_gen `ptr_associative_container_gen`]
+
+[section Synopsis]
+[reference__ptr_associative_container_gen]
+[endsect]
+
+[section Description]
+TODO
+
+It is possible to nest containers via `ptr_associative_container_gen`, e.g.:
+
+``
+typedef _mpl_apply_wrap2_<
+ ptr_associative_container_gen<mapS>
+ , _mpl_apply_wrap1_<ptr_associative_container_gen<setS>,char>::type
+ , _std_string_
+ >::type
+ MapOfCharSets2Strings;
+``
+
+[important
+ This last capability depends on __Boost_Type_Traits_Operators__, which has
+ been recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__, add the `type_traits` module to your list of header
+ directories, and `#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS` in order
+ to obtain this capability.
+
+ If you do not need this capability, then you do not need
+ __Boost_Type_Traits_Operators__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_ptr_assoc_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ ptr_associative_container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_container_gen.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/ref_ptr_container_gen.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,68 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section:ptr_container_gen `ptr_container_gen`]
+
+[section Synopsis]
+[reference__ptr_container_gen]
+[endsect]
+
+[section Description]
+Analagous to the __container_gen__ metafunction, you can use this one to easily
+select an appropriate __Boost_Pointer_Container__ type. Pointer containers are
+ideal for storing heterogeneous items with a common base type, e.g. shapes:
+
+[example__output_shape_stats__type_definitions]
+
+Algorithms that work on the standard containers also work on pointer containers
+out of the box.
+
+[example__output_shape_stats__functions]
+
+The `ptr_container_gen` metafunction allows you to programmatically swap out
+different pointer container types using type selectors.
+
+[example__output_shape_stats__usage]
+
+This library provides specializations of the `ptr_container_gen` metafunction
+for each selector it defines. Here are the selector definitions:
+
+[reference__container_selectors]
+
+The specialization for the `listS` selector is shown here.
+
+[reference__ptr_container_gen__list_specialization]
+
+It is possible to nest associative containers via `ptr_container_gen`, e.g.:
+
+``
+typedef ptr_container_gen<setS,ptr_container_gen<setS,int>::type>::type
+ SetOfSetsOfIntegers;
+``
+
+[important
+ This last capability depends on __Boost_Type_Traits_Operators__, which has
+ been recently accepted into Boost but is currently not part of an official
+ release. For now, you must perform a Subversion checkout from the
+ __SVN_Trac__, add the `type_traits` module to your list of header
+ directories, and `#define BOOST_CONTAINER_GEN_USES_OP_TYPE_TRAITS` in order
+ to obtain this capability.
+
+ If you do not need this capability, then you do not need
+ __Boost_Type_Traits_Operators__.
+]
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__boost_utility_ptr_container_gen_hpp__>
+``
+[endsect]
+
+[endsect] [/ ptr_container_gen]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/doc/reference.qbk 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,26 @@
+[/=============================================================================
+ Copyright (C) 2011 Cromwell D. Enage
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+=============================================================================/]
+
+[section Reference]
+
+[include ref_container_gen.qbk]
+[include ref_ptr_container_gen.qbk]
+[include ref_assoc_container_gen.qbk]
+[include ref_ptr_assoc_container_gen.qbk]
+[include ref_is_rand_access_selector.qbk]
+[include ref_is_unique_assoc_sel.qbk]
+
+ * __container_gen__
+ * __ptr_container_gen__
+ * __associative_container_gen__
+ * __ptr_associative_container_gen__
+ * __is_random_access_selector__
+ * __is_unique_associative_selector__
+
+[endsect] [/ Reference]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/example/output_char_tallies.cpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/example/output_char_tallies.cpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,62 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <string>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/utility/associative_container_gen.hpp>
+
+//[example__output_char_tallies__definition
+template <typename Selector>
+void output_char_tallies(std::string const& str, Selector)
+{
+ typedef typename boost::mpl::apply_wrap2<
+ boost::associative_container_gen<Selector>
+ , char
+ , std::size_t
+ >::type
+ FrequencyTable;
+
+ FrequencyTable freq_table;
+ char reverse_counter = 0;
+
+ for (std::size_t i = 0; i < str.size(); ++i)
+ {
+ typename FrequencyTable::iterator ft_itr = freq_table.find(str[i]);
+
+ if (ft_itr == freq_table.end())
+ {
+ freq_table.insert(typename FrequencyTable::value_type(str[i], 1));
+ }
+ else
+ {
+ ++ft_itr->second;
+ }
+ }
+
+ for (
+ typename FrequencyTable::const_iterator ft_itr = freq_table.begin();
+ ft_itr != freq_table.end();
+ ++ft_itr
+ )
+ {
+ std::cout << ft_itr->first << ": " << ft_itr->second << std::endl;
+ }
+
+ std::cout << std::endl;
+}
+//]
+
+//[example__output_char_tallies__calls
+int main(int, char**)
+{
+ output_char_tallies("abacadabra", boost::hash_mapS());
+ output_char_tallies("loolapalooza", boost::multimapS());
+ return 0;
+}
+//]
+

Added: sandbox/utility-container_gen/libs/utility/container_gen/example/output_shape_stats.cpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/libs/utility/container_gen/example/output_shape_stats.cpp 2011-10-19 13:32:20 EDT (Wed, 19 Oct 2011)
@@ -0,0 +1,134 @@
+//=======================================================================
+// Copyright (C) 2011 Cromwell D. Enage
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//=======================================================================
+#include <iostream>
+#include <string>
+#include <cmath>
+#include <boost/math/constants/constants.hpp>
+#include <boost/range/numeric.hpp>
+#include <boost/utility/ptr_container_gen.hpp>
+
+//[example__output_shape_stats__type_definitions
+struct my_shape
+{
+ virtual ~my_shape()
+ {
+ }
+
+ virtual double compute_perimeter() const = 0;
+
+ virtual double compute_area() const = 0;
+};
+
+class your_square : public my_shape
+{
+ double length;
+
+ public:
+ explicit your_square(double s = 1.0) : length(s)
+ {
+ }
+
+ double compute_perimeter() const
+ {
+ return length * 4.0;
+ }
+
+ double compute_area() const
+ {
+ return length * length;
+ }
+};
+
+class your_circle : public my_shape
+{
+ double radius;
+
+ public:
+ explicit your_circle(double r = 1.0) : radius(r)
+ {
+ }
+
+ double compute_perimeter() const
+ {
+ return boost::math::constants::pi<double>() * radius * 2.0;
+ }
+
+ double compute_area() const
+ {
+ return boost::math::constants::pi<double>() * radius * radius;
+ }
+};
+
+class some_right_triangle : public my_shape
+{
+ double base;
+ double height;
+
+ public:
+ some_right_triangle(double b, double h) : base(b), height(h)
+ {
+ }
+
+ some_right_triangle() : base(1.0), height(1.0)
+ {
+ }
+
+ double compute_perimeter() const
+ {
+ using namespace std;
+ return sqrt(base * base + height * height) + base + height;
+ }
+
+ double compute_area() const
+ {
+ return boost::math::constants::half<double>() * base * height;
+ }
+};
+//]
+
+//[example__output_shape_stats__functions
+double add_perimeter(double value, my_shape const& shape)
+{
+ return shape.compute_perimeter() + value;
+}
+
+double add_area(double value, my_shape const& shape)
+{
+ return shape.compute_area() + value;
+}
+
+template <typename Shapes>
+void output_shape_stats(Shapes const& shapes)
+{
+ std::cout << "Total perimeter length = " << boost::accumulate(
+ shapes
+ , 0.0
+ , add_perimeter
+ ) << std::endl;
+ std::cout << "Total area = " << boost::accumulate(
+ shapes
+ , 0.0
+ , add_area
+ ) << std::endl;
+}
+//]
+
+//[example__output_shape_stats__usage
+int main(int, char**)
+{
+ boost::ptr_container_gen<boost::listS,my_shape>::type shapes;
+
+ shapes.push_back(new your_square());
+ shapes.push_back(new your_circle());
+ shapes.push_back(new some_right_triangle());
+
+ output_shape_stats(shapes);
+ return 0;
+}
+//]
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk