$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r64710 - in sandbox/statistics/support/boost/assign/v2/detail: checking functor fwd type_traits/container
From: erwann.rogard_at_[hidden]
Date: 2010-08-09 17:18:31
Author: e_r
Date: 2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
New Revision: 64710
URL: http://svn.boost.org/trac/boost/changeset/64710
Log:
Adding more container type traits and support for (sequence) ptr_container
Added:
   sandbox/statistics/support/boost/assign/v2/detail/checking/map.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/functor/new.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/fwd/ptr_container.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/forward_to_value.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_associative.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_set.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value_container.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/static_size.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/value_container.hpp   (contents, props changed)
Added: sandbox/statistics/support/boost/assign/v2/detail/checking/map.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/checking/map.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,63 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_CHECKING_MAP_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CHECKING_MAP_ER_2010_HPP
+#include <boost/range/begin.hpp>
+#include <boost/utility.hpp>
+
+#include <boost/assign/v2/detail/checking/check_equal.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/detail/type_traits/container/is_map.hpp>
+
+namespace boost{                                                               
+namespace assign{ 
+namespace v2{
+namespace checking{ 
+
+    // Assumes 
+    // map[ a ] = a; ...; map[ h ] = h;
+    template<typename V>
+    void do_check(container_tag::map, V & map) // non-const due to operator[]
+    {                                      
+    	{  // Key                                
+        	using namespace checking::constants::sorted;
+        	do_check(
+           		boost::next( boost::begin( map ), 0 )->first,
+           		boost::next( boost::begin( map ), 1 )->first,
+           		boost::next( boost::begin( map ), 2 )->first,
+           		boost::next( boost::begin( map ), 3 )->first,
+           		boost::next( boost::begin( map ), 4 )->first,
+           		boost::next( boost::begin( map ), 5 )->first,
+           		boost::next( boost::begin( map ), 6 )->first,
+           		boost::next( boost::begin( map ), 7 )->first
+        	);
+        }
+        {  // Data
+        	using namespace checking::constants;
+        	do_check(
+            	map[ a ],
+            	map[ b ],
+            	map[ c ],
+            	map[ d ],
+            	map[ e ],
+            	map[ f ],
+            	map[ g ],
+            	map[ h ]
+        	);
+            
+        }
+    }                                           
+
+}// checking
+}// v2
+}// assign
+}// boost    
+    
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/functor/new.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/functor/new.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,129 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_DETAIL_FUNCTOR_NEW_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_FUNCTOR_NEW_ER_2010_HPP
+#include <memory>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/range/reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/assign/v2/detail/type_traits/container/value.hpp>
+#include <boost/assign/v2/detail/config/arity_bound.hpp>
+#include <boost/assign/v2/detail/functor/crtp_unary_and_up.hpp>
+
+namespace boost{
+namespace assign{ 
+namespace v2{
+namespace functor_aux{
+
+	template<typename T>
+	class new_ : public functor_aux::crtp_unary_and_up< 
+    	functor_aux::new_<T>, 
+        boost::mpl::always<T*> 
+    >
+	{
+    	typedef T* ptr_;
+		typedef functor_aux::new_<T> this_;
+        typedef boost::mpl::always< ptr_ > meta_result_;
+        typedef functor_aux::crtp_unary_and_up<this_, meta_result_> super_;
+         
+    	public:
+        
+        typedef ptr_ result_type;
+        
+		new_(){}
+    
+		result_type operator()()const{ return new T(); } 
+
+		using super_::operator();
+
+#define BOOST_ASSIGN_V2_impl(z,N,data) \
+    template<BOOST_PP_ENUM_PARAMS(N,typename T)> \
+    result_type impl( BOOST_PP_ENUM_BINARY_PARAMS(N, T, &_) )const{ \
+        return new T( BOOST_PP_ENUM_PARAMS(N,_) ); \
+    } \
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+	1,
+    BOOST_ASSIGN_V2_ARITY_BOUND,
+    BOOST_ASSIGN_V2_impl,
+    ~
+)
+#undef BOOST_ASSIGN_V2_impl
+	
+	};
+
+	template<typename V>
+    struct deduce_new_
+    {
+    	typedef typename container_type_traits::value<V>::type value_;
+        typedef functor_aux::new_<value_> type;
+        static type call(){ return functor_aux::new_<value_>(); }
+    };
+
+	// --- For testing only --- //
+
+struct foo
+{
+    int i;
+    
+    foo() : i(0)
+    { }
+    foo( int i ) : i(i)
+    { }
+    foo( int i, int ) : i(i)
+    { }
+    foo( const char*, int i, int ) : i(i)
+    { }
+
+    virtual ~foo()
+    { }
+};
+
+struct foo_bar : foo
+{
+    foo_bar( int i ) : foo(i)
+    { }
+    
+    foo_bar( int i, const char* )
+    { }
+};
+
+inline bool operator<( const foo& l, const foo& r )
+{
+    return l.i < r.i;
+}
+    
+}// functor_aux
+namespace result_of{
+
+	template<typename T>
+	struct new_
+    {
+        typedef functor_aux::new_<T> type;
+    };
+
+}// result_of
+
+	template<typename T>
+	typename result_of::new_<T>::type
+    new_()
+    {
+    	typedef typename result_of::new_<T>::type result_;
+    	return result_();
+    }
+        	
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/fwd/ptr_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/fwd/ptr_container.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,98 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_DETAIL_FWD_PTR_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_FWD_PTR_CONTAINER_ER_2010_HPP
+
+namespace boost{
+
+    template
+    <
+        class T,
+        size_t N,
+        class CloneAllocator
+    >
+    class ptr_array;
+
+    template
+    < 
+        class T, 
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_circular_buffer;
+
+    template
+    < 
+        class T, 
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_deque;
+    
+    template
+    < 
+        class T, 
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_list;
+
+    template
+    < 
+        class Key, 
+        class T, 
+        class Compare,
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_map;
+
+    template
+    < 
+        class Key, 
+        class Compare,
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_set;
+
+    template
+    < 
+        class Key, 
+        class T, 
+        class Hash,
+        class Pred,
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_unordered_map;
+
+    template
+    < 
+        class Key, 
+        class Hash,
+        class Pred,
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_unordered_set;
+
+
+    template
+    < 
+        class T, 
+        class CloneAllocator,
+        class Allocator
+    >
+    class ptr_vector;
+
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/forward_to_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/forward_to_value.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,30 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_FWD_TO_VALUE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_FWD_TO_VALUE_ER_2010_HPP
+#include <boost/assign/v2/detail/type_traits/container/value_container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+
+	template<template<typename T> class F,typename V>
+    struct forward_to_value: F<
+    	typename value_container<V>::type
+    >{};
+
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_associative.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_associative.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,35 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_ASSOCIATIVE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_ASSOCIATIVE_ER_2010_HPP
+#include <boost/mpl/or.hpp>
+#include <boost/assign/v2/detail/type_traits/container/is_map.hpp>
+#include <boost/assign/v2/detail/type_traits/container/is_set.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_tag{
+	struct associative{};
+}// container_tag
+namespace container_type_traits{
+
+	template<typename V>
+    struct is_associative : boost::mpl::or_<
+    	container_type_traits::is_set<V>,
+        container_type_traits::is_map<V>
+    >{};
+    
+}// container_type_traits
+}// v2
+}// assign
+}// boost 
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_PTR_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_PTR_CONTAINER_ER_2010_HPP
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/assign/v2/detail/type_traits/container/ptr_to_value.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+	template<typename V>
+    struct is_ptr_container : ptr_to_value<V>::is_applicable{};
+
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/is_set.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,45 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_SET_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_IS_SET_ER_2010_HPP
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/assign/v2/detail/fwd/container.hpp>
+#include <boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp>
+#include <boost/assign/v2/detail/type_traits/container/forward_to_value.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_tag{
+	struct set{};
+}// container_tag
+namespace container_type_traits{
+
+	template<typename V>
+    struct is_set_impl : boost::mpl::false_{};
+
+	template<typename K,typename C,typename A>
+    struct is_set_impl< 
+    	std::set<K,C,A> 
+    > : boost::mpl::true_{};
+
+    template<typename V>
+    struct is_set : forward_to_value<
+    	is_set_impl,
+    	typename boost::remove_cv<V>::type
+    >{};
+    
+}// container_type_traits
+}// v2
+}// assign
+}// boost 
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,196 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_PTR_TO_VALUE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_PTR_TO_VALUE_ER_2010_HPP
+#include <memory> // std::allocator
+#include <boost/preprocessor/cat.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/assign/v2/detail/fwd/ptr_container.hpp>
+#include <boost/assign/v2/detail/fwd/container.hpp>
+#include <boost/assign/v2/detail/type_traits/container/static_size.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+	template<typename V>
+    struct ptr_to_value{
+    
+    	struct is_applicable : boost::mpl::false_{};
+    
+    };
+
+namespace ptr_to_value_aux{
+
+	template<typename A,typename T> struct allocator{};
+    
+    template<typename T>
+    struct allocator<std::allocator<void*>, T>
+    {
+    	typedef std::allocator<T> type;
+    };
+
+	template<typename V>
+    struct common
+    {
+
+    	struct is_applicable : boost::mpl::true_{};
+
+    	typedef typename boost::remove_reference<
+        	typename V::reference
+        >::type value_type;
+        
+        typedef typename ptr_to_value_aux::allocator<
+        	typename V::allocator_type,
+            value_type
+        >::type allocator_type;
+    };
+
+	template<typename V,template<typename, std::size_t> class F>
+	struct static_array_like{	
+
+		// there is no allocator, hence can't derive from common<V>
+
+    	struct is_applicable : boost::mpl::true_{};
+
+    	typedef typename boost::remove_reference<
+        	typename V::reference
+        >::type value_type;
+	
+		typedef F<
+        	typename static_array_like::value_type,
+            container_type_traits::static_size<V>::value 
+        > container_type;
+        
+    };
+
+	template<typename V,template<typename,typename> class F>
+	struct seq_like : ptr_to_value_aux::common<V>{	
+
+		typedef F<
+        	typename seq_like::value_type,
+            typename seq_like::allocator_type
+        > container_type;
+        
+    };
+
+	template<typename V,template<typename,typename,typename,typename> class F>
+	struct map_like : ptr_to_value_aux::common<V>{	
+
+		typedef F<
+        	typename V::key_type,
+        	typename map_like::value_type,
+            typename V::key_compare,
+            typename map_like::allocator_type
+        > container_type;
+        
+    };
+
+	template<typename V,template<typename,typename,typename> class F>
+	struct set_like : ptr_to_value_aux::common<V>{	
+
+		typedef F<
+        	typename V::key_type,
+            typename V::key_compare,
+            typename set_like::allocator_type
+        > container_type;
+        
+    };
+
+	template<typename V,
+    	template<typename,typename,typename,typename,typename> class F>
+    class unordered_map_like : ptr_to_value_aux::common<V>{
+
+		typedef F<
+        	typename V::key_type,
+            typename unordered_map_like::value_type,
+            typename V::hasher,
+            typename V::key_equal,
+            typename unordered_map_like::allocator_type
+        > container_type;
+    
+    };
+
+	template<typename V,
+    	template<typename,typename,typename,typename> class F>
+    class unordered_set_like : ptr_to_value_aux::common<V>{
+
+		typedef F<
+        	typename V::key_type,
+            typename V::hasher,
+            typename V::key_equal,
+            typename unordered_set_like::allocator_type
+        > container_type;
+    
+    };
+
+    
+}// ptr_to_value_aux
+
+
+	// Array
+	template<
+    	typename T,
+        std::size_t N,
+        typename A
+    > 
+    struct ptr_to_value<
+    	boost::ptr_array<T,N,A>
+    > : ptr_to_value_aux::static_array_like<
+    	boost::ptr_array<T,N,A>,
+        boost::array
+    >{};
+
+	// Sequence
+
+	template<
+    	typename T,
+        typename C,
+        typename A
+    > 
+    struct ptr_to_value<
+    	boost::ptr_deque<T,C,A>
+    > : ptr_to_value_aux::seq_like<
+    	boost::ptr_deque<T,C,A>,
+        std::deque
+    >{};
+
+	template<
+    	typename T,
+        typename C,
+        typename A
+    > 
+    struct ptr_to_value<
+    	boost::ptr_list<T,C,A>
+    > : ptr_to_value_aux::seq_like<
+    	boost::ptr_list<T,C,A>,
+        std::list
+    >{};
+
+	template<
+    	typename T,
+        typename C,
+        typename A
+    > 
+    struct ptr_to_value<
+    	boost::ptr_vector<T,C,A>
+    > : ptr_to_value_aux::seq_like<
+    	boost::ptr_vector<T,C,A>,
+        std::vector
+    >{};
+
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/ptr_to_value_container.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_PTR_TO_VALUE_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_PTR_TO_VALUE_CONTAINER_ER_2010_HPP
+#include <boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+    template<typename V>
+    struct ptr_to_value_container{
+    	typedef typename ptr_to_value<V>::container_type type;
+    };
+    
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/static_size.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/static_size.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,47 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_STATIC_SIZE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_STATIC_SIZE_ER_2010_HPP
+#include <boost/mpl/size_t.hpp>
+#include <boost/assign/v2/detail/fwd/container.hpp>
+#include <boost/assign/v2/detail/fwd/ptr_container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+
+	template<typename V>
+    struct static_size{
+    
+    	// Needed as a meta-function (indirection) bec. ptr_array
+        // does not expose static_size.
+    
+    };
+
+	template<typename T,std::size_t N>
+    struct static_size< boost::array<T,N> >
+    	: boost::mpl::size_t<
+    		boost::array<T,N>::static_size
+    	>{};
+
+	template<typename T,std::size_t N,typename C>
+    struct static_size< boost::ptr_array<T, N, C> >
+    	: boost::mpl::size_t<
+    		N
+    	>{};
+
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/value_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/type_traits/container/value_container.hpp	2010-08-09 17:18:29 EDT (Mon, 09 Aug 2010)
@@ -0,0 +1,34 @@
+//////////////////////////////////////////////////////////////////////////////
+//  Boost.Assign v2                                                         //
+//                                                                          //
+//  Copyright (C) 2003-2004 Thorsten Ottosen                                //
+//  Copyright (C) 2010 Erwann Rogard                                        //
+//  Use, modification and distribution are subject to 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_ASSIGN_V2_TYPE_TRAITS_CONTAINER_VALUE_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_TYPE_TRAITS_CONTAINER_VALUE_CONTAINER_ER_2010_HPP
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/assign/v2/detail/type_traits/container/is_ptr_container.hpp>
+#include <boost/assign/v2/detail/type_traits/container/ptr_to_value_container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace container_type_traits{
+
+	template<typename V>
+    struct value_container : boost::mpl::eval_if<
+        is_ptr_container<V>,
+    	ptr_to_value_container<V>,
+        boost::mpl::identity<V>
+    >{};
+    
+}// container_type_traits
+}// v2
+}// assign
+}// boost
+
+#endif