$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60168 - sandbox/statistics/detail/assign/boost/assign/auto_size/array
From: erwann.rogard_at_[hidden]
Date: 2010-03-04 22:42:54
Author: e_r
Date: 2010-03-04 22:42:54 EST (Thu, 04 Mar 2010)
New Revision: 60168
URL: http://svn.boost.org/trac/boost/changeset/60168
Log:
m
Added:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp
      - copied unchanged from r60165, /sandbox/statistics/detail/assign/boost/assign/auto_size/array/policy.hpp
Removed:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/policy.hpp
Deleted: sandbox/statistics/detail/assign/boost/assign/auto_size/array/policy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/policy.hpp	2010-03-04 22:42:54 EST (Thu, 04 Mar 2010)
+++ (empty file)
@@ -1,101 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// assign::detail::array::policy.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_AUTO_SIZE_DETAIL_ARRAY_POLICY_ER_2010_HPP
-#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_POLICY_ER_2010_HPP
-#include <boost/shared_ptr.hpp>
-#include <boost/assign/auto_size/array/interface.hpp>
-#include <boost/assign/auto_size/array/ref.hpp>
-#include <boost/assign/auto_size/detail/policy.hpp>
-
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-	// tag::lazy_array designates a policy for auto_size::expr<>, that has the 
-    // functionality of array_interface<>, and postones allocation until it is 
-    // necessary. It is therefore suitable as the result of statements such as:
-    //  fun(a)(b)(c);
-
-	namespace tag{
-    	struct lazy_array{};
-    }
-
-   	template<typename T,int N,template<typename> class Ref,typename D>
-   	class lazy_array; 
-
-    template<typename E> struct expr_size;
-    template<typename E> struct expr_elem;
-
-    template<>
-    struct policy<tag::lazy_array>
-    {
-        template<typename E,template<typename> class Ref>
-        struct apply{
-        	typedef typename expr_size<E>::type size_;
-            typedef typename expr_elem<E>::type elem_;
-            typedef lazy_array<elem_,size_::value,Ref,E> type;
-        };
-	};        
- 
-    template<
-    	typename E,typename T,int N,template<typename> class Ref,typename P
-    >
-    class expr;         
-
-    template<typename A,typename E,typename T,int N,
-    	template<typename> class Ref,typename P>
-    void write_to_array(A& a,const expr<E,T,N,Ref,P>& e);
-                  
-   // Policy for the collection builder, auto_size::expr<>, that exposes an 
-   // array interface
-   template<typename T,int N,template<typename> class Ref,typename D>
-   class lazy_array 
-    	: public array_interface<T,N,Ref,lazy_array<T,N,Ref,D> >
-    {
-
-        typedef typename auto_size::ref_array<T,N,Ref>::type ref_array_;
-                
-        void alloc_if()const{
-            if(!this->ptr){
-               return this->alloc();
-            }
-        }
-
-        void alloc()const{ 
-            this->ptr = smart_ptr_(new ref_array_);
-            write_to_array(*this->ptr,static_cast<const D&>(*this));		
-        }
-		
-        public:
-
-        ref_array_& ref_array_impl(){ 
-            this->alloc_if();
-            return (*this->ptr);
-        }
-
-        const ref_array_& ref_array_impl()const{ 
-            this->alloc_if();
-            return (*this->ptr);
-        }
-        
-        private:
-        typedef boost::shared_ptr<ref_array_> smart_ptr_;
-        // Only the last of N expressions needs to instantiate an array, 
-        // hence a pointer.
-        mutable smart_ptr_ ptr;
-
-    };
-
-}// auto_size  
-}// detail      
-}// assign
-}// boost
-
-#endif