Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68504 - in sandbox/assign_v2/boost/assign/v2/ref/list: . array holder
From: erwann.rogard_at_[hidden]
Date: 2011-01-27 18:39:34


Author: e_r
Date: 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
New Revision: 68504
URL: http://svn.boost.org/trac/boost/changeset/68504

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/ref/list/
   sandbox/assign_v2/boost/assign/v2/ref/list/array/
   sandbox/assign_v2/boost/assign/v2/ref/list/array.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/array/policy.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/at.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/container.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/converter.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/fwd.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/holder/
   sandbox/assign_v2/boost/assign/v2/ref/list/holder.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/holder/head.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/holder/tail.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/make.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/nth_result_of.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/policy.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/ref/list/size_type.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/ref/list/array.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/array.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_ARRAY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_ARRAY_ER_2010_HPP
+
+#include <boost/assign/v2/ref/list/array/policy.hpp>
+#include <boost/assign/v2/ref/list/array/rebind.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/array/policy.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/array/policy.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,115 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_ARRAY_POLICY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_ARRAY_POLICY_ER_2010_HPP
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/assign/v2/ref/array/alloc/lazy.hpp>
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/assign/v2/ref/list/holder.hpp>
+#include <boost/assign/v2/ref/list/size_type.hpp>
+#include <boost/assign/v2/ref/list/policy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ // -- Fits the (linked) list with an array-like interface
+
+ typedef alloc_tag::lazy_alloc array_tag;
+
+ // policy_helperx<> extracts from the list the value-type for the array
+
+ template<
+ typename U1 // old result
+ , typename U2 // candidate
+ , typename V1 = typename boost::remove_cv<U1>::type
+ , typename V2 = typename boost::remove_cv<U2>::type
+ >
+ struct policy_helper1
+ {
+ // Un-defined bec. V1 and V2 must be identical
+ };
+
+ template<typename U1, typename U2, typename V>
+ struct policy_helper1<U1, U2, V, V> : boost::mpl::eval_if<
+ boost::is_const<U1>
+ , ::boost::mpl::identity<U1>
+ , ::boost::mpl::identity<U2>
+ >{
+ // If one const, always const.
+ };
+
+ template<typename U1 // old result
+ ,typename U2, typename L // container<Tag, U2, L>
+ >
+ struct policy_helper2
+ {
+ typedef typename policy_helper1<U1, U2>::type new_u1_;
+ typedef typename head_value<L>::type prior_u2_;
+ typedef typename tail_of<L>::type prior_l_;
+ typedef typename policy_helper2<
+ new_u1_, prior_u2_, prior_l_
+ >::type type;
+ };
+
+ template<typename U1>
+ struct policy_helper2<U1, void_, nil >
+ {
+ // Reached root
+ typedef U1 type;
+ };
+
+ template<typename U2, typename L>
+ struct policy_helper3 : policy_helper2<
+ U2
+ , typename head_value<L>::type
+ , typename tail_of<L>::type
+ >{};
+
+ template<>
+ struct policy_helper3<void_, nil >
+ {
+ // Empty container
+ typedef void_ type;
+ };
+
+ template<>
+ struct policy<array_tag>
+ {
+
+ template<typename H = void_, typename T = nil>
+ struct apply
+ {
+ typedef alloc_tag::lazy_alloc tag_;
+ typedef list_aux::container<tag_, H, T> derived_;
+ typedef typename boost::remove_reference<H>::type u1_;
+ typedef typename list_aux::policy_helper3<u1_, T>::type value_;
+ typedef array_aux::lazy_alloc<
+ tail_holder<T>::size::value
+ ,value_
+ ,derived_
+ > type;
+ };
+
+ };
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,83 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_ARRAY_REBIND_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_ARRAY_REBIND_ER_2010_HPP
+#include <boost/static_assert.hpp>
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/assign/v2/ref/list/at.hpp>
+#include <boost/assign/v2/ref/list/size_type.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ template<
+ size_type K,typename A,
+ typename Tag, typename H, typename T
+ >
+ void assign_array(
+ ::boost::mpl::true_ /*exit*/,
+ A& a,
+ const list_aux::container<Tag, H, T>& l
+ )
+ {
+ /*exit*/
+ }
+
+ template<
+ size_type K,typename A,
+ typename Tag, typename H, typename T
+ >
+ void assign_array(
+ ::boost::mpl::false_ /*exit*/,
+ A& a,
+ const list_aux::container<Tag, H, T>& l
+ )
+ {
+ typedef ::boost::mpl::int_<K-1> index_;
+ a[ K - 1 ].rebind( at<K-1>( l ) ) ;
+ typedef index_ next_size_;
+ typedef ::boost::mpl::int_<0> zero_;
+ typedef typename ::boost::mpl::equal_to<next_size_,zero_>::type exit_;
+ assign_array<K-1>( exit_(), a, l );
+ }
+
+ // A must be a static array of reference wrappers
+ template<typename A, typename Tag, typename H, typename T>
+ void assign_array(
+ A& a,
+ list_aux::container<Tag, H, T> const & l
+ )
+ {
+ typedef list_aux::container<Tag, H, T> list_;
+ BOOST_STATIC_ASSERT( A::static_size <= list_::size::value );
+ typedef ::boost::mpl::int_<0> zero_;
+ typedef ::boost::mpl::int_<A::static_size> size_;
+ typedef typename ::boost::mpl::equal_to<size_, zero_>::type exit_;
+ list_aux::assign_array<size_::value>( exit_(), a, l );
+ }
+
+}// list_aux
+
+using list_aux::assign_array;
+
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/at.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/at.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,82 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_AT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_AT_ER_2010_HPP
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/assign/v2/ref/list/size_type.hpp>
+#include <boost/assign/v2/ref/list/holder.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ template<size_type I, typename T>
+ struct is_head :
+ ::boost::mpl::bool_< I + 1 == T::size::value>{};
+
+namespace result_of{
+
+ template<size_type I, typename T>
+ struct at : ::boost::mpl::eval_if<
+ list_aux::is_head<I, T>
+ ,head_reference<T>
+ ,result_of::at<I, typename tail_of<T>::type>
+ >{};
+
+}// result_of
+
+ template<size_type I, typename T>
+ typename boost::lazy_enable_if<
+ list_aux::is_head<I, T>,
+ list_aux::result_of::at<I, T>
+ >::type
+ at_helper(T const& t)
+ {
+ return t.head();
+ }
+
+ template<size_type I, typename T>
+ typename boost::lazy_disable_if<
+ is_head<I, T>,
+ list_aux::result_of::at<I, T>
+ >::type
+ at_helper(T const& t)
+ {
+ return at_helper<I>( t.tail() );
+ }
+
+ template<size_type I, typename Tag, typename H, typename T>
+ typename list_aux::result_of::at<I, container<Tag, H, T> >::type
+ at(container<Tag, H, T> const& t)
+ {
+ return at_helper<I>( t );
+ }
+
+}// list_aux
+using list_aux::at;
+namespace result_of{
+
+ template<list_aux::size_type I, typename T>
+ struct at : list_aux::result_of::at<I, T>{};
+
+}// result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/container.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,102 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_CONTAINER_ER_2010_HPP
+#include <boost/mpl/apply.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+/* #ifndef BOOST_NO_RVALUE_REFERENCES
+#include <utility>
+#else*/
+#include <boost/call_traits.hpp>
+//#endif
+#include <boost/assign/v2/ref/list/fwd.hpp> // consistency
+#include <boost/assign/v2/ref/list/holder/tail.hpp>
+#include <boost/assign/v2/ref/list/holder/head.hpp>
+#include <boost/assign/v2/ref/list/policy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ template<typename Tag, typename H, typename T>
+ class container :
+ public head_holder<H>,
+ public tail_holder<T>,
+ public ::boost::mpl::apply2<policy<Tag>, H, T>::type
+ {
+
+ typedef head_holder<H> head_holder_;
+ typedef tail_holder<T> tail_holder_;
+
+ public:
+
+ container(){}
+
+ template<typename H1>
+ struct result{
+ typedef container this_;
+ typedef container<Tag, H1, this_> type;
+ };
+
+/* // TODO see head_holder
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ explicit container(
+ H&& h,
+ typename boost::call_traits<T>::param_type t
+ )
+ : head_holder_( std::forward<H>( h ) ),
+ tail_holder_( t )
+ {
+ }
+
+ template<typename H1>
+ typename result<H1>::type
+ operator()(H1&& h)const{
+ typedef typename result<H1>::type result_;
+ return result_( std::forward<H1>( h ), *this);
+ }
+
+#else */
+
+ explicit container(
+ H h,
+ typename boost::call_traits<T>::param_type t
+ )
+ : head_holder_( h ), tail_holder_( t )
+ {}
+
+ template<typename H1>
+ typename result<H1&>::type
+ operator()(H1& h)const{
+ typedef typename result<H1&>::type result_;
+ return result_( h, *this);
+ }
+
+ template<typename H1>
+ typename result<H1 const&>::type
+ operator()(H1 const& h)const{
+ typedef typename result<H1 const&>::type result_;
+ return result_( h, *this);
+ }
+// #endif
+
+
+ };
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/converter.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/converter.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,33 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_CONVERTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_CONVERTER_ER_2010_HPP
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/assign/v2/utility/convert/converter.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+#define SEQ (Tag)(H)(T)
+#define U container<Tag, H, T>
+BOOST_ASSIGN_V2_CONVERTER(U, SEQ)
+#undef U
+#undef SEQ
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/fwd.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -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_REF_LIST_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_FWD_ER_2010_HPP
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ template<typename Tag> struct empty_list;
+
+ struct void_;
+ struct nil;
+
+ template<typename Tag, typename H = void_, typename T = nil>
+ class container;
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/holder.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/holder.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_HOLDER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_HOLDER_ER_2010_HPP
+
+#include <boost/assign/v2/ref/list/holder/head.hpp>
+#include <boost/assign/v2/ref/list/holder/tail.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/holder/head.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/holder/head.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,84 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_HOLDER_HEAD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_HOLDER_HEAD_ER_2010_HPP
+#include <boost/config.hpp>
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+/* #ifndef BOOST_NO_RVALUE_REFERENCES
+#include <utility>
+#endif */
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+/* // TODO as standalone ok, but unsure effects in relation with ref-arrays
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template<typename T>
+ struct head_holder{
+
+ typedef T head_value_type;
+
+ explicit head_holder(T&& t)
+ : head(
+ std::move( t )
+ ){}
+
+ T&& head;
+
+ };
+#else */
+
+ template<typename T> struct head_holder{
+ // undefined
+ };
+//#endif
+
+ template<typename T> struct head_holder<T&>{
+
+ typedef T head_value_type;
+
+ explicit head_holder(T& t) : head_( t ){}
+
+ typedef T& result_of_head_type;
+ result_of_head_type head()const{ return this->head_; }
+
+ private:
+ mutable T& head_;
+
+ };
+
+ template<>
+ struct head_holder<void_>
+ {
+ typedef void_ head_value_type;
+ head_holder(){}
+ };
+
+ template<typename T>
+ struct head_value{ typedef typename T::head_value_type type; };
+
+ template<typename T>
+ struct head_reference
+ : boost::add_reference<typename head_value<T>::type>
+ {};
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/holder/tail.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/holder/tail.hpp 2011-01-27 18:39:25 EST (Thu, 27 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_REF_LIST_HOLDER_TAIL_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_HOLDER_TAIL_ER_2010_HPP
+#include <boost/config.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/assign/v2/ref/list/fwd.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ struct nil{ nil(){} };
+
+ template<typename T>
+ struct tail_holder
+ {
+ typedef T tail_type;
+ typedef ::boost::mpl::int_<T::size::value+1> size;
+ tail_holder(T const& t) : tail_( t ){}
+
+ typedef T const& result_of_tail_type;
+ result_of_tail_type tail()const{ return this->tail_; }
+
+ private:
+ T const& tail_;
+ };
+
+ template<>
+ struct tail_holder<nil>
+ {
+ typedef nil tail_type;
+ typedef ::boost::mpl::int_<0> size;
+ tail_holder(){}
+ };
+
+ template<typename T>
+ struct tail_of{ typedef typename T::tail_type type; };
+
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/make.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,37 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_MAKE_ER_2010_HPP
+#include <boost/assign/v2/detail/keyword/nil.hpp>
+#include <boost/assign/v2/ref/list/container.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+
+ template<typename Tag>
+ struct empty_list{ typedef list_aux::container<Tag> type; };
+
+ template<typename Tag>
+ typename empty_list<Tag>::type
+ list( keyword_aux::nil )
+ {
+ typedef typename empty_list<Tag>::type result_;
+ return result_();
+ }
+
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/nth_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/nth_result_of.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,62 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_NTH_RESULT_OF_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_NTH_RESULT_OF_ER_2010_HPP
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/vector.hpp> //user
+#include <boost/assign/v2/ref/list/fwd.hpp>
+#include <boost/assign/v2/ref/list/make.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ template<typename Tag>
+ struct nth_result
+ {
+
+ typedef typename ref::empty_list<Tag>::type state_;
+
+ template<typename State, typename T>
+ struct result : State::template result<T>{};
+
+ template<typename Vec>
+ struct apply : ::boost::mpl::fold<
+ Vec,
+ state_,
+ result< ::boost::mpl::_1, ::boost::mpl::_2>
+ >{};
+
+ };
+
+}// fusion_aux
+namespace nth_result_of{
+
+ template<typename Tag>
+ struct list
+ {
+ template<typename Vec>
+ struct apply : ::boost::mpl::apply1<
+ list_aux::nth_result<Tag>,
+ Vec
+ >{};
+ };
+
+}// nth_result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/policy.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/policy.hpp 2011-01-27 18:39:25 EST (Thu, 27 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_REF_LIST_POLICY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_POLICY_ER_2010_HPP
+#include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/always.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ // --- Default policy
+ template<typename Tag> struct policy : ::boost::mpl::always<
+ ::boost::mpl::empty_base
+ >{};
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/ref/list/size_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/size_type.hpp 2011-01-27 18:39:25 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_LIST_SIZE_TYPE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_SIZE_TYPE_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_aux{
+
+ typedef int size_type;
+
+}// list_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk