$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r67947 - in sandbox/statistics/support/boost/assign/v2: detail/checking misc misc/convert
From: erwann.rogard_at_[hidden]
Date: 2011-01-10 23:39:29
Author: e_r
Date: 2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
New Revision: 67947
URL: http://svn.boost.org/trac/boost/changeset/67947
Log:
upd boost/assign/v2
Added:
   sandbox/statistics/support/boost/assign/v2/detail/checking/fwd.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/
   sandbox/statistics/support/boost/assign/v2/misc/convert/
   sandbox/statistics/support/boost/assign/v2/misc/convert.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/check.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/convert.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/converter.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/deduce.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/dispatch.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/helper.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/predicate.hpp   (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/misc/convert/tag.hpp   (contents, props changed)
Added: sandbox/statistics/support/boost/assign/v2/detail/checking/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/detail/checking/fwd.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CHECKING_FWD_ER_2010_HPP
+
+namespace boost{                                                               
+namespace assign{ 
+namespace v2{
+namespace checking{
+namespace container{
+
+    template<typename V> void do_check(V const & v);
+    template<typename V> void do_check(V& v);
+
+}// container
+}// checking
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_MISC_CONVERT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_MISC_CONVERT_ER_2010_HPP
+
+#include <boost/assign/v2/misc/convert/converter.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/check.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/check.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -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_CONVERT_CHECK_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_CHECK_ER_2010_HPP
+#include <deque>
+#include <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <boost/type.hpp>
+#include <boost/array.hpp>
+#include <boost/assign/v2/misc/convert/converter.hpp>
+#include <boost/assign/v2/detail/checking/fwd.hpp>
+
+// Don't include this file in v2/misc/convert.hpp
+// To use it, precede by
+// #include <boost/assign/v2/detail/checking/container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace checking{
+namespace convert{
+
+	template<typename To, typename From>
+    void do_check(From const& from)
+    {
+        namespace ns = checking::container;
+        To to = converter( from );
+        ns::do_check( to );
+        // ns::do_check( To( converter( from ) ) ); 
+    }
+
+	template<typename From>
+    void do_check(From const& from)
+    {
+    	namespace ns = checking::convert;
+        // From is specified in case it is either of those in the lhs below.
+        ns::do_check<boost::array<int, 8>, From >( from );
+        ns::do_check<std::deque<int>, From >( from );
+        ns::do_check<std::list<int>, From >( from );
+        ns::do_check<std::queue<int>, From >( from );
+        ns::do_check<std::set<int>, From >( from );
+        ns::do_check<std::stack<int>, From >( from );
+        ns::do_check<std::vector<int>, From >( from );
+    }
+
+}// convert
+}// checking
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/convert.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_CONVERT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_CONVERT_ER_2010_HPP
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assign/v2/put/pipe/range.hpp>
+#include <boost/assign/v2/misc/convert/tag.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+
+	template<typename T, typename U>
+    T convert(U const& u, convert_tag::put) 
+    {
+        T t; (t | v2::_put_range( u ) );
+        return t;
+    }
+
+	template<typename T, typename U>
+	T convert(U const& u, convert_tag::copy)
+    {
+    	return T( boost::begin( u ), boost::end( u ) );
+    }
+
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/converter.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/converter.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,66 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_CONVERTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_CONVERTER_ER_2010_HPP
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assign/v2/ref/wrapper.hpp>
+#include <boost/assign/v2/misc/convert/dispatch.hpp>
+#include <boost/assign/v2/misc/convert/deduce.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace convert_aux{
+
+	template<typename U>
+    class converter
+    {
+    
+     	typedef typename ref::type_traits::copy_wrapper<
+        	U const
+        >::type wrapper_;
+        
+        public:
+        
+    	explicit converter(U const& u) : w( u ){}
+                
+        template<typename T>
+        operator T () const
+        {
+        	return type<T>();
+        }
+
+		template<typename T>
+        T type()const
+        {
+        	typedef typename convert_aux::deduce_tag<T, U>::type tag_;
+            return convert<T>( this->w.unwrap(), tag_() );
+        }
+
+		private:
+        wrapper_ w;
+
+	};
+
+}// convert_aux
+
+	template<typename U>
+	convert_aux::converter<U> 
+    converter(U const& u){ 
+    	typedef convert_aux::converter<U> result_; 
+    	return result_( u ); 
+    }
+
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/deduce.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/deduce.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,56 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_DEDUCE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_DEDUCE_ER_2010_HPP
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/assign/v2/detail/traits/switch.hpp>
+#include <boost/assign/v2/misc/convert/tag.hpp>
+#include <boost/assign/v2/misc/convert/helper.hpp>
+#include <boost/assign/v2/misc/convert/predicate.hpp>
+
+namespace boost{
+	struct use_default;
+namespace assign{
+namespace v2{
+namespace switch_tag{
+	struct deduce_convert{};
+}// switch_tag
+namespace switch_aux{
+
+    template<>
+    struct case_<switch_tag::deduce_convert, 0> :
+        convert_aux::helper<
+            v2::convert_tag::put,
+            v2::convert_aux::use_put
+        >{};
+
+    template<>
+    struct case_<switch_tag::deduce_convert, 1> : 
+        convert_aux::helper<v2::convert_tag::copy>{};
+
+}// switch_aux
+namespace convert_aux{
+
+    template<typename T, typename U>
+    struct deduce_tag : v2::switch_aux::result<
+    	v2::switch_tag::deduce_convert,
+    	boost::mpl::pair<T, U>
+    >
+    {};
+
+}// convert_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/dispatch.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/dispatch.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_DISPATCH_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_DISPATCH_ER_2010_HPP
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assign/v2/put/pipe/range.hpp>
+#include <boost/assign/v2/misc/convert/tag.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+
+	template<typename T, typename U>
+    T convert(U const& u, convert_tag::put) 
+    {
+        T t; (t | v2::_put_range( u ) );
+        return t;
+    }
+
+	template<typename T, typename U>
+	T convert(U const& u, convert_tag::copy)
+    {
+    	return T( boost::begin( u ), boost::end( u ) );
+    }
+
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/helper.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/helper.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,42 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_HELPER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_HELPER_ER_2010_HPP
+#include <boost/mpl/bool.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace convert_aux{
+    
+    // This is in replacement of switch_aux::helper since here we need
+    // two arguments.
+    
+    template<typename T, typename U>
+    struct default_f : boost::mpl::true_{};
+    
+    template<typename Tag, 
+    	template<typename, typename> class F = convert_aux::default_f>
+    struct helper
+    {
+        typedef Tag tag;
+        template<typename T>  // T must derive from mpl::pair<>
+        struct apply 
+        	: F<typename T::first, typename T::second>
+        {
+        };
+    };
+
+}// convert_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/predicate.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/predicate.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,32 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_TRAITS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_TRAITS_ER_2010_HPP
+#include <boost/mpl/or.hpp>
+#include <boost/assign/v2/detail/traits/container/is_static_array.hpp>
+#include <boost/assign/v2/detail/traits/container/has_push.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace convert_aux{
+
+	template<typename T, typename U>
+    struct use_put : boost::mpl::or_<
+    	v2::container_traits::is_static_array<T>,
+        v2::container_traits::has_push<T>
+    >{};
+        
+}// convert_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/misc/convert/tag.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/misc/convert/tag.hpp	2011-01-10 23:39:28 EST (Mon, 10 Jan 2011)
@@ -0,0 +1,26 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONVERT_TAG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_CONVERT_TAG_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace convert_tag{
+
+	struct put{};
+    struct copy{};
+
+}// convert_tag
+}// v2
+}// assign
+}// boost
+
+#endif