$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60784 - sandbox/statistics/detail/assign/boost/assign/auto_size/range
From: erwann.rogard_at_[hidden]
Date: 2010-03-22 22:50:51
Author: e_r
Date: 2010-03-22 22:50:51 EDT (Mon, 22 Mar 2010)
New Revision: 60784
URL: http://svn.boost.org/trac/boost/changeset/60784
Log:
m
Added:
   sandbox/statistics/detail/assign/boost/assign/auto_size/range/iterator_converter.hpp   (contents, props changed)
   sandbox/statistics/detail/assign/boost/assign/auto_size/range/result_of_chain.hpp   (contents, props changed)
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/range/iterator_converter.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/range/iterator_converter.hpp	2010-03-22 22:50:51 EDT (Mon, 22 Mar 2010)
@@ -0,0 +1,93 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::converted_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_ITERATOR_CONVERTER_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_ITERATOR_CONVERTER_ER_2010_HPP
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/utility/enable_if.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 V>
+struct converted_iterator_reference{
+
+    typedef typename boost::iterator_reference<I>::type f_ref_;
+    typedef typename boost::remove_reference<f_ref_>::type f_val_;
+    typedef V t_val_;
+    typedef typename boost::add_reference<V>::type t_ref_;
+    typedef typename boost::is_convertible<f_val_,t_val_> necessary_;
+    typedef typename boost::is_convertible<f_ref_,t_ref_>::type use_ref_;
+    typedef typename boost::mpl::if_<use_ref_,t_ref_,t_val_>::type type;
+   
+    static void internal_check(){
+       BOOST_MPL_ASSERT((necessary_));
+    }
+    
+};
+
+template<typename I, typename V,
+    typename R = typename converted_iterator_reference<I,V>::type>
+struct converted_iterator : boost::iterator_adaptor<
+    detail::converted_iterator<I,V,R>           // Derived
+    ,I                                          // Base
+    ,V                                          // Value
+    ,use_default                                // CategoryOrTraversal
+    ,R                                          // Reference
+    ,use_default                                // Difference
+>{
+    typedef boost::iterator_adaptor<
+        detail::converted_iterator<I,V,R> 				
+        ,I                         						
+        ,V 		
+        ,use_default 
+        ,R 												
+        ,use_default 
+    > super_;
+    
+    converted_iterator(){}
+    converted_iterator(const I& base):super_(base){
+    }
+}; 
+} //detail
+
+struct use_default;
+
+template<typename V,typename R,typename I>
+detail::converted_iterator<I,V,R>
+convert_iterator(
+    const I& i,
+    typename boost::disable_if<boost::is_same<R,use_default> >::type* = 0
+)
+{
+    typedef detail::converted_iterator<I,V,R> result_;
+    return result_(i);
+}
+
+template<typename V,typename R,typename I>
+detail::converted_iterator<I,V>
+convert_iterator(
+    const I& i,
+    typename boost::enable_if<boost::is_same<R,use_default> >::type* = 0
+)
+{
+    typedef detail::converted_iterator<I,V> result_;
+    return result_(i);
+}
+
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/detail/assign/boost/assign/auto_size/range/result_of_chain.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/range/result_of_chain.hpp	2010-03-22 22:50:51 EDT (Mon, 22 Mar 2010)
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// assign::detail::range::result_of_chain.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_RANGE_RESULT_OF_CHAIN_ER_2010_HPP
+#define BOOST_ASSIGN_DETAIL_RANGE_RESULT_OF_CHAIN_ER_2010_HPP
+#include <boost/typeof/typeof.hpp>
+#include <boost/range/chain.hpp>
+
+namespace boost{
+namespace assign{
+namespace detail{
+
+namespace result_of{
+    template<typename R1,typename R2>
+    struct chain{
+        static R1 r1;
+        static R2 r2;
+        typedef BOOST_TYPEOF_TPL( boost::chain(r1,r2) ) type;
+    };
+}
+
+}// detail
+}// assign
+}// boost
+
+#endif
\ No newline at end of file