Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76837 - sandbox/utility-container_gen/boost/utility
From: sponage_at_[hidden]
Date: 2012-02-02 00:21:18


Author: expaler
Date: 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
New Revision: 76837
URL: http://svn.boost.org/trac/boost/changeset/76837

Log:
Boost.Utility.ContainerGen uses TR1 hash functor where applicable.
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/has_stable_iters_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_associative_selector.hpp (contents, props changed)
   sandbox/utility-container_gen/boost/utility/is_multiple_assoc_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/is_unordered_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)

Added: sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/associative_container_gen.hpp 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,566 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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 <boost/utility/container_selector.hpp>
+
+#include <set>
+#include <map>
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/container/set.hpp>
+#include <boost/container/map.hpp>
+#include <boost/container/flat_set.hpp>
+#include <boost/container/flat_map.hpp>
+#endif
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/tr1/unordered_map.hpp>
+#include <boost/tr1/functional.hpp>
+
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/eval_if.hpp>
+#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>
+
+//[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
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <>
+ struct associative_container_gen<boost_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::set<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::set<Key>
+ , ::boost::container::map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<boost_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::set<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::set<Key>
+ , ::boost::container::map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<boost_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::multiset<Key>
+ , ::boost::container::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<boost_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::multiset<Key>
+ , ::boost::container::multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<flat_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_set<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_set<Key>
+ , ::boost::container::flat_map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<flat_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_set<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_map<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_set<Key>
+ , ::boost::container::flat_map<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<flat_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_multiset<Key>
+ , ::boost::container::flat_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<flat_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ typedef typename ::boost::mpl::eval_if<
+ ::boost::detail::is_container<Key>
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_multiset<
+ Key
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_multimap<
+ Key
+ , Mapped
+ , ::boost::detail::range_less
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::container::flat_multiset<Key>
+ , ::boost::container::flat_multimap<Key,Mapped>
+ >
+ >::type
+ type;
+ };
+ };
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ template <>
+ struct associative_container_gen<hash_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_set<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::std::tr1::unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct associative_container_gen<hash_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::std::tr1::unordered_multiset<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::std::tr1::unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+ //->
+} // 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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,375 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011-2012 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
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <boost/container/vector.hpp>
+#include <boost/container/stable_vector.hpp>
+#include <boost/container/deque.hpp>
+#include <boost/container/list.hpp>
+#include <boost/container/slist.hpp>
+#include <boost/container/set.hpp>
+#include <boost/container/flat_set.hpp>
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/tr1/functional.hpp>
+
+#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>
+
+//[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>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::set<ValueType,::boost::detail::range_less>
+ , ::std::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::multiset<ValueType,::boost::detail::range_less>
+ , ::std::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_vecS,ValueType>
+ {
+ typedef ::boost::container::vector<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<stable_vecS,ValueType>
+ {
+ typedef ::boost::container::stable_vector<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_dequeS,ValueType>
+ {
+ typedef ::boost::container::deque<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_listS,ValueType>
+ {
+ typedef ::boost::container::list<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_slistS,ValueType>
+ {
+ typedef ::boost::container::slist<ValueType> type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::set<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::set<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<boost_multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<flat_setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::flat_set<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<flat_mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::flat_set<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<flat_multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::flat_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<flat_multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::container::flat_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::container::flat_multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct container_gen<hash_multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ //->
+} // 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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,383 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011-2012 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 {
+
+ struct vecS { };
+ struct dequeS { };
+ struct listS { };
+#if !defined BOOST_NO_SLIST
+ struct slistS { };
+#endif
+ struct setS { };
+ struct mapS { };
+ struct multisetS { };
+ struct multimapS { };
+ struct boost_vecS { };
+ struct stable_vecS { };
+ struct boost_dequeS { };
+ struct boost_listS { };
+ struct boost_slistS { };
+ struct boost_setS { };
+ struct boost_mapS { };
+ struct boost_multisetS { };
+ struct boost_multimapS { };
+ struct hash_setS { };
+ struct hash_mapS { };
+ struct hash_multisetS { };
+ struct hash_multimapS { };
+ struct flat_setS { };
+ struct flat_mapS { };
+ struct flat_multisetS { };
+ struct flat_multimapS { };
+} // namespace boost
+//]
+
+#else // defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+
+#if !defined BOOST_NO_SLIST
+# ifdef BOOST_SLIST_HEADER
+# include BOOST_SLIST_HEADER
+# else
+# include <slist>
+# endif
+#endif
+
+#include <boost/tr1/unordered_set.hpp>
+#include <boost/tr1/functional.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_unordered_set.hpp>
+
+#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>
+
+//[reference__ptr_container_selectors
+namespace boost {
+
+ 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;
+ };
+ //->
+ };
+
+ //<-
+#if !defined BOOST_NO_SLIST
+ struct slistS
+ {
+ template <typename T>
+ struct bind_
+ {
+ typedef ::BOOST_STD_EXTENSION_NAMESPACE::slist<T> type;
+ };
+ };
+#endif
+ //->
+
+ struct setS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ 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;
+ };
+ //->
+ };
+
+ struct mapS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ 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;
+ };
+ //->
+ };
+
+ struct multisetS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ 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;
+ };
+ //->
+ };
+
+ struct multimapS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ 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;
+ };
+ //->
+ };
+
+ struct hash_setS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_set<
+ ValueType
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<T,::std::tr1::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_set<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<T,::std::tr1::hash<T> >
+ >::type
+ ptr_type;
+ };
+ //->
+ };
+
+ struct hash_mapS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_set<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_set<T,::std::tr1::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_set<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<T,::std::tr1::hash<T> >
+ >::type
+ ptr_type;
+ };
+ //->
+ };
+
+ struct hash_multisetS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_multiset<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<T,::std::tr1::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_multiset<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<T,::std::tr1::hash<T> >
+ >::type
+ ptr_type;
+ };
+ //->
+ };
+
+ struct hash_multimapS
+ {
+ //<-
+ template <typename T>
+ struct bind_
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::std::tr1::unordered_multiset<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::std::tr1::unordered_multiset<T,::std::tr1::hash<T> >
+ >::type
+ type;
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<T>
+ , ::boost::ptr_unordered_multiset<
+ T
+ , ::std::tr1::hash<T>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<T,::std::tr1::hash<T> >
+ >::type
+ ptr_type;
+ };
+ //->
+ };
+
+ //<-
+ 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);
+#if !defined BOOST_NO_SLIST
+ BOOST_CONTAINER_SELECTOR(slistS);
+#endif
+ 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);
+ BOOST_CONTAINER_SELECTOR(hash_multisetS);
+ BOOST_CONTAINER_SELECTOR(hash_multimapS);
+
+#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/has_stable_iters_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/has_stable_iters_selector.hpp 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,103 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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_HAS_STABLE_ITERS_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_HAS_STABLE_ITERS_SELECTOR_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__has_stable_iterators_selector
+namespace boost {
+
+ template <typename Selector>
+ struct has_stable_iterators_selector : ::boost::mpl::true_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(
+ 1
+ , is_unique_associative_selector
+ , (Selector)
+ )
+ //->
+ };
+
+ //<-
+ template <>
+ struct has_stable_iterators_selector<vecS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<dequeS> : ::boost::mpl::false_
+ {
+ };
+
+#if !defined BOOST_UNORDERED_ITERATORS_ARE_STABLE
+ template <>
+ struct has_stable_iterators_selector<hash_setS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<hash_mapS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<hash_multisetS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<hash_multimapS> : ::boost::mpl::false_
+ {
+ };
+#endif
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <>
+ struct has_stable_iterators_selector<boost_vecS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<boost_dequeS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<flat_setS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<flat_mapS> : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<flat_multisetS>
+ : ::boost::mpl::false_
+ {
+ };
+
+ template <>
+ struct has_stable_iterators_selector<flat_multimapS>
+ : ::boost::mpl::false_
+ {
+ };
+#endif
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_HAS_STABLE_ITERS_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_associative_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_associative_selector.hpp 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,39 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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_ASSOCIATIVE_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_ASSOCIATIVE_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/is_unique_assoc_selector.hpp>
+#include <boost/utility/is_multiple_assoc_selector.hpp>
+
+//[reference__is_associative_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_associative_selector
+ : ::boost::mpl::or_<
+ is_unique_associative_selector<Selector>
+ , is_multiple_associative_selector<Selector>
+ >
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(
+ 1
+ , is_associative_selector
+ , (Selector)
+ )
+ //->
+ };
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_ASSOCIATIVE_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_multiple_assoc_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_multiple_assoc_selector.hpp 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,85 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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_MULTIPLE_ASSOC_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_MULTIPLE_ASSOC_SELECTOR_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_multiple_associative_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_multiple_associative_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(
+ 1
+ , is_multiple_associative_selector
+ , (Selector)
+ )
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_multiple_associative_selector<multisetS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<multimapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<hash_multisetS>
+ : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<hash_multimapS>
+ : ::boost::mpl::true_
+ {
+ };
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <>
+ struct is_multiple_associative_selector<boost_multisetS>
+ : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<boost_multimapS>
+ : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<flat_multisetS>
+ : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_multiple_associative_selector<flat_multimapS>
+ : ::boost::mpl::true_
+ {
+ };
+#endif
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_MULTIPLE_ASSOC_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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,86 @@
+//=======================================================================
+// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
+// Copyright 2010 Thomas Claveirole
+// Copyright 2011-2012 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_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_RANDOM_ACCESS_SELECTOR_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#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_
+ {
+ };
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <>
+ struct is_random_access_selector<boost_vecS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<stable_vecS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<boost_dequeS> : ::boost::mpl::true_
+ {
+ };
+
+#if 0
+ template <>
+ struct is_random_access_selector<flat_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<flat_mapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<flat_multisetS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_random_access_selector<flat_multimapS> : ::boost::mpl::true_
+ {
+ };
+#endif
+#endif
+ //->
+} // 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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,79 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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/config.hpp>
+#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_
+ {
+ };
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <>
+ struct is_unique_associative_selector<boost_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<boost_mapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<flat_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unique_associative_selector<flat_mapS> : ::boost::mpl::true_
+ {
+ };
+#endif
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_UNIQUE_ASSOC_SELECTOR_HPP_INCLUDED
+

Added: sandbox/utility-container_gen/boost/utility/is_unordered_selector.hpp
==============================================================================
--- (empty file)
+++ sandbox/utility-container_gen/boost/utility/is_unordered_selector.hpp 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,52 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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_UNORDERED_SELECTOR_HPP_INCLUDED
+#define BOOST_UTILITY_IS_UNORDERED_SELECTOR_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+#include <boost/utility/container_selector.hpp>
+
+//[reference__is_unordered_selector
+namespace boost {
+
+ template <typename Selector>
+ struct is_unordered_selector : ::boost::mpl::false_
+ {
+ //<-
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_unordered_selector,(Selector))
+ //->
+ };
+
+ //<-
+ template <>
+ struct is_unordered_selector<hash_setS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unordered_selector<hash_mapS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unordered_selector<hash_multisetS> : ::boost::mpl::true_
+ {
+ };
+
+ template <>
+ struct is_unordered_selector<hash_multimapS> : ::boost::mpl::true_
+ {
+ };
+ //->
+} // namespace boost
+//]
+
+#endif // BOOST_UTILITY_IS_UNORDERED_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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,319 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/tr1/functional.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>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+
+//[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
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_setS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_mapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_set<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::boost::ptr_unordered_map<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_multisetS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct ptr_associative_container_gen<hash_multimapS>
+ {
+ template <typename Key, typename Mapped = void>
+ struct apply
+ {
+ 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
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ , ::boost::detail::range_equal
+ >
+ >
+ , ::boost::mpl::if_<
+ ::std::tr1::is_same<Mapped,void>
+ , ::boost::ptr_unordered_multiset<
+ Key
+ , ::std::tr1::hash<Key>
+ >
+ , ::boost::ptr_unordered_multimap<
+ Key
+ , Mapped
+ , ::std::tr1::hash<Key>
+ >
+ >
+ >::type
+ type;
+ };
+ };
+ //->
+} // 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 2012-02-02 00:21:13 EST (Thu, 02 Feb 2012)
@@ -0,0 +1,213 @@
+//=======================================================================
+// Copyright (C) 2011-2012 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/mpl/if.hpp>
+#include <boost/tr1/functional.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>
+#include <boost/detail/metafunction/is_container.hpp>
+#include <boost/detail/function/range_equal.hpp>
+#include <boost/detail/function/range_less.hpp>
+
+//[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>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_set<ValueType,::boost::detail::range_less>
+ , ::boost::ptr_set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_set<ValueType,::boost::detail::range_less>
+ , ::boost::ptr_set<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_multiset<
+ ValueType
+ , ::boost::detail::range_less
+ >
+ , ::boost::ptr_multiset<ValueType>
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_setS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_mapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_set<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_multisetS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+
+ template <typename ValueType>
+ struct ptr_container_gen<hash_multimapS,ValueType>
+ {
+ typedef typename ::boost::mpl::if_<
+ ::boost::detail::is_container<ValueType>
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ , ::boost::detail::range_equal
+ >
+ , ::boost::ptr_unordered_multiset<
+ ValueType
+ , ::std::tr1::hash<ValueType>
+ >
+ >::type
+ type;
+ };
+ //->
+} // 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
+


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