$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60628 - sandbox/statistics/detail/assign/boost/assign/auto_size/chain
From: erwann.rogard_at_[hidden]
Date: 2010-03-15 19:00:07
Author: e_r
Date: 2010-03-15 19:00:07 EDT (Mon, 15 Mar 2010)
New Revision: 60628
URL: http://svn.boost.org/trac/boost/changeset/60628
Log:
m
Added:
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/chain_convert_impl.hpp   (contents, props changed)
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp   (contents, props changed)
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/chain_convert_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/chain_convert_impl.hpp	2010-03-15 19:00:07 EDT (Mon, 15 Mar 2010)
@@ -0,0 +1,58 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::chain_convert_impl.hpp                                   //
+//                                                                          //
+//  (C) Copyright 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_DETAIL_CHAIN_CONVERT_IMPL_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_CHAIN_CONVERT_IMPL_ER_2010_HPP
+#include <boost/range/chain.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/auto_size/chain/pair_range_traits.hpp>
+
+namespace boost{
+namespace assign{
+
+namespace result_of{
+
+    template<typename Conv,typename R1,typename R2>
+    struct chain_convert_impl{
+        typedef detail::pair_range_traits::generic<Conv,R1,R2> traits_;
+        typedef typename traits_::new_range1_ new_range1_;
+        typedef typename traits_::new_range2_ new_range2_;
+        static const new_range1_& new_range1;
+        static const new_range2_& new_range2;
+
+        typedef BOOST_TYPEOF_TPL( boost::chain(new_range1,new_range2) ) type;
+        
+        static type call(R1& r1,R2& r2)
+        {
+            traits_::internal_check();
+            typedef typename traits_::caller1_ caller1_;
+            typedef typename traits_::caller2_ caller2_;
+            return boost::chain(caller1_::call(r1),caller2_::call(r2));
+        }
+    };
+    
+}// result_of
+
+template<typename Conv,typename R1,typename R2>
+typename result_of::chain_convert_impl<Conv,R1,R2>::type
+chain_convert_impl(R1& r1, R2& r2){
+    typedef result_of::chain_convert_impl<Conv,R1,R2> caller_;
+    return caller_::call(r1,r2);
+}
+template<typename Conv,typename R1,typename R2>
+typename result_of::chain_convert_impl<Conv,const R1,const R2>::type
+chain_convert_impl(const R1& r1, const R2& r2){
+    typedef result_of::chain_convert_impl<Conv,const R1,const R2> caller_;
+    return caller_::call(r1,r2);
+}
+
+}// assign
+}// boost
+
+#endif
+ 
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp	2010-03-15 19:00:07 EDT (Mon, 15 Mar 2010)
@@ -0,0 +1,61 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::convert_iterator.hpp                                     //
+//                                                                          //
+//  (C) Copyright 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_DETAIL_CONVERT_ITERATOR_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_CONVERT_ITERATOR_ER_2010_HPP
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost{
+namespace assign{
+namespace detail{
+
+template<typename I,typename T>
+struct iterator_converter : boost::iterator_adaptor<
+    detail::iterator_converter<I,T> 		    // Derived
+    ,I                         					// Base
+    ,typename boost::remove_reference<T>::type 	// Value
+    ,use_default                                // CategoryOrTraversal
+    ,T 											// Reference
+    ,use_default                                // Difference
+>{
+
+    typedef boost::iterator_adaptor<
+        detail::iterator_converter<I,T> 				
+        ,I                         						
+        ,typename boost::remove_reference<T>::type 		
+        ,use_default 
+        ,T 												
+        ,use_default 
+    > super_;
+    
+    iterator_converter(){}
+    iterator_converter(const I& base):super_(base){}
+}; 
+namespace result_of{
+
+    template<typename T,typename I>
+    struct convert_iterator{
+        typedef detail::iterator_converter<I,T> type;
+    };
+
+}
+
+template<typename T,typename I>
+typename result_of::convert_iterator<T,I>::type
+convert_iterator(const I& i){
+    typedef typename result_of::convert_iterator<T,I>::type result_;
+    return result_(i);
+}
+} //detail
+}// assign
+}// boost
+
+#endif