Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66539 - sandbox/statistics/support/boost/assign/v2/ref/fusion
From: erwann.rogard_at_[hidden]
Date: 2010-11-12 11:41:14


Author: e_r
Date: 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
New Revision: 66539
URL: http://svn.boost.org/trac/boost/changeset/66539

Log:
adding boost/assign/v2/ref/fusion
Added:
   sandbox/statistics/support/boost/assign/v2/ref/fusion/
   sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_array.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_copy.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_rebind.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_xxx.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/container.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/fusion.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/fwd.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/head_holder.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/link_holder.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/make.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/most_const.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/nil_arg.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/nth_result_of.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/policy.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/fusion/root.hpp (contents, props changed)

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_array.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_ASSIGN_ARRAY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_ARRAY_ER_2010_HPP
+#include <boost/static_assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/assign/v2/ref/fusion/fwd.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ // ---- assign_array ---- //
+
+ template<
+ std::size_t K,typename A,
+ std::size_t N, typename L, typename Tag1, typename Tag2, typename T
+ >
+ void assign_array(
+ boost::mpl::true_ /*exit*/,
+ A& a,
+ const fusion_aux::container<N, L, Tag1, Tag2, T>& f
+ )
+ {
+ /*exit*/
+ }
+
+ template<
+ std::size_t K,typename A,
+ std::size_t N, typename L, typename Tag1, typename Tag2,typename T
+ >
+ void assign_array(
+ boost::mpl::false_ /*exit*/,
+ A& a,
+ const fusion_aux::container<N, L, Tag1, Tag2, T>& f
+ )
+ {
+ typedef boost::mpl::int_<K-1> index_;
+ a[ K - 1 ].rebind( f.static_lookup( index_() ) ) ;
+ 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, f );
+ }
+
+ // A must be a static array of reference wrappers
+ template<typename A,std::size_t N, typename L,
+ typename Tag1, typename Tag2, typename T>
+ void assign_array(
+ A& a,
+ fusion_aux::container<N, L, Tag1, Tag2, T> const & f
+ )
+ {
+ // don't replace by size_::value <= N (causes warning)
+ BOOST_STATIC_ASSERT( A::static_size <= N );
+ typedef boost::mpl::int_<0> zero_;
+ typedef boost::mpl::int_<A::static_size> size_;
+ typedef typename boost::mpl::equal_to<size_, zero_>::type exit_;
+ fusion_aux::assign_array<size_::value>( exit_(), a, f );
+ }
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_copy.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,17 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_ASSIGN_COPY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_COPY_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/ref/fusion/assign_xxx.hpp>
+
+BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_XXX(assign_copy, assign_tag::copy)
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_rebind.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_rebind.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,17 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_ASSIGN_REBIND_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_REBIND_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/rebind.hpp>
+#include <boost/assign/v2/ref/fusion/assign_xxx.hpp>
+
+BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_XXX(assign_rebind, assign_tag::rebind)
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_xxx.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/assign_xxx.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,43 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_ASSIGN_XXX
+#include <boost/assign/v2/detail/keyword/nil.hpp>
+#include <boost/assign/v2/ref/fusion/make.hpp>
+#include <boost/assign/v2/ref/fusion/nth_result_of.hpp>
+#define BOOST_ASSIGN_V2_REF_FUSION_ASSIGN_XXX(NS, Tag1) \
+ \
+namespace boost{ \
+namespace assign{ \
+namespace v2{ \
+namespace ref{ \
+namespace NS{ \
+namespace nth_result_of{ \
+ template<typename Tag2, typename Tnil = fusion_aux::nil_arg_type> \
+ struct fusion : ref::nth_result_of::fusion<Tag1, Tag2, Tnil>{}; \
+} \
+ template<typename Tag2> \
+ typename ref::result_of::empty_fusion< \
+ Tag1, \
+ Tag2, \
+ fusion_aux::nil_arg_type \
+ >::type \
+ fusion( keyword_aux::nil const& ) \
+ { \
+ return ref::fusion<Tag1, Tag2>( v2::_nil ); \
+ } \
+\
+} \
+} \
+} \
+} \
+} \
+/**/
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/container.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,160 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_CONTAINER_ER_2010_HPP
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/ref/fusion/policy.hpp>
+#include <boost/assign/v2/ref/fusion/link_holder.hpp>
+#include <boost/assign/v2/ref/fusion/head_holder.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<std::size_t N, typename L,typename Tag1, typename Tag2, typename T>
+ struct interface : boost::mpl::apply4<
+ fusion_aux::policy<Tag2>,
+ boost::mpl::int_<N>, L, Tag1, T
+ >{};
+
+ template<
+ std::size_t N, typename L, typename Tag1, typename Tag2, typename T>
+ class container
+ : public fusion_aux::link_holder<L, N == 0>,
+ public fusion_aux::head_holder<Tag1, T, N == 0>,
+ public fusion_aux::interface<N, L, Tag1, Tag2, T>::type
+ {
+
+ typedef boost::mpl::int_<0> int0_;
+ typedef boost::mpl::int_<1> int1_;
+ typedef boost::mpl::int_<N> size_;
+ typedef typename boost::mpl::minus<size_,int1_>::type index_;
+ typedef Tag1 assign_tag_;
+
+ typedef typename fusion_aux::interface<
+ N,
+ L,
+ Tag1,
+ Tag2,
+ T
+ >::type super_t;
+
+ typedef fusion_aux::link_holder<L, size_::value == 0> link_;
+ typedef fusion_aux::head_holder<Tag1, T, size_::value == 0> head_;
+
+ public:
+
+ // -- used by most_const -- //
+ typedef T head_value_type;
+ typedef L link_value_type;
+
+ typedef std::size_t size_type;
+ BOOST_STATIC_CONSTANT(std::size_t, static_size = N);
+ typedef typename boost::mpl::equal_to<size_,int0_>::type is_empty_;
+
+ explicit container(){}
+ explicit container(const L& l, T& h)
+ : link_( l ),
+ head_( h )
+ {}
+
+ template<typename NewL, typename NewTag2, typename U>
+ explicit container(const container<N, NewL, Tag1, NewTag2, U>& that)
+ :link_( that ),
+ head_( that ),
+ super_t( that ){}
+
+ // ------ operator() ----- //
+ // adds an element //
+ // ----------------------- //
+
+ template<typename T1>
+ struct result{
+ typedef container this_;
+ typedef container<N+1, this_, Tag1, Tag2, T1> type;
+ };
+
+ template<typename T1>
+ typename result<T1>::type
+ operator()(T1& t)const{
+ typedef typename result<T1>::type result_;
+ return result_( *this, t );
+ }
+
+ template<typename T1>
+ typename result<T1 const>::type
+ operator()(T1 const& t)const{
+ typedef typename result<T1 const>::type result_;
+ return result_( *this, t );
+ }
+
+ // ---- static_lookup ---- //
+
+ template<int I>
+ struct is_head : boost::mpl::bool_< I + 1 == N >{};
+
+ template<int I>
+ struct link_result_static_lookup : L::template
+ result_static_lookup<I>{};
+
+ template<int I>
+ struct result_static_lookup : boost::mpl::eval_if<
+ is_head<I>,
+ boost::mpl::identity<T&>,
+ link_result_static_lookup<I>
+ >{};
+
+ // A template is needed even as the argument is known, to prevent
+ // compiler errors for N = 0.
+ template<int I>
+ typename boost::lazy_enable_if<
+ is_head<I>,
+ result_static_lookup<I>
+ >::type
+ static_lookup(boost::mpl::int_<I> same_index)const
+ {
+ return this->head.unwrap();
+ }
+
+ template<int I>
+ typename boost::lazy_disable_if<
+ is_head<I>,
+ result_static_lookup<I>
+ >::type
+ static_lookup(boost::mpl::int_<I> smaller_index)const
+ {
+ return this->link().static_lookup( smaller_index );
+ }
+
+ };
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/fusion.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/fusion.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_FUSION_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_FUSION_ER_2010_HPP
+
+#include <boost/assign/v2/ref/fusion/assign_array.hpp>
+#include <boost/assign/v2/ref/fusion/assign_copy.hpp>
+#include <boost/assign/v2/ref/fusion/assign_rebind.hpp>
+#include <boost/assign/v2/ref/fusion/container.hpp>
+#include <boost/assign/v2/ref/fusion/make.hpp>
+#include <boost/assign/v2/ref/fusion/most_const.hpp>
+#include <boost/assign/v2/ref/fusion/nil_arg.hpp>
+#include <boost/assign/v2/ref/fusion/nth_result_of.hpp>
+#include <boost/assign/v2/ref/fusion/policy.hpp>
+#include <boost/assign/v2/ref/fusion/root.hpp>
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/fwd.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,36 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<std::size_t N, typename L,
+ typename Tag1,typename Tag2, typename T>
+ class container;
+
+ template<typename A, std::size_t N, typename L,
+ typename Tag1, typename Tag2, typename T>
+ void assign_array(
+ A& a,
+ fusion_aux::container<N, L, Tag1, Tag2, T> const & f
+ );
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/head_holder.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/head_holder.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -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_REF_FUSION_HEAD_HOLDER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_HEAD_HOLDER_ER_2010_HPP
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/void.hpp>
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<typename Tag,typename T, bool is_empty = false>
+ class head_holder{
+
+ typedef ref::wrapper<Tag, T> wrapper_;
+
+ public:
+
+ typedef T head_value_type;
+
+ head_holder(){}
+ head_holder( T& h ) : head( h ){}
+
+ mutable wrapper_ head;
+
+ T& back()const
+ {
+ return this->head.unwrap();
+ }
+
+ };
+
+ template<typename Tag, typename T>
+ class head_holder<Tag, T, true>{
+
+ //head_holder(){}
+
+ public:
+
+ typedef boost::mpl::void_ head_value_type;
+
+ head_value_type back()const
+ {
+ return head_value_type();
+ }
+
+ };
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/link_holder.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/link_holder.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,61 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_LINK_HOLDER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_LINK_HOLDER_ER_2010_HPP
+#include <boost/mpl/int.hpp>
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<typename L, bool is_empty = false>
+ class link_holder{
+
+ typedef ref::assign_tag::copy tag_;
+ typedef ref::wrapper<tag_, const L> wrapper_;
+
+ public:
+
+ link_holder(){}
+ link_holder( const L& l) : value( l ){}
+
+ wrapper_ pop()const
+ {
+ // Warning : probably inefficient
+ return value;
+ }
+
+ const L& link()const{ return this->value.unwrap(); }
+
+ protected:
+ mutable wrapper_ value;
+
+ };
+
+ template<typename L>
+ class link_holder<L,true>{
+
+ //link_holder(){}
+
+ void pop()const{}
+
+ };
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/make.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,71 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_MAKE_ER_2010_HPP
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/vector/vector0.hpp>
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/assign/v2/detail/keyword/nil.hpp>
+#include <boost/assign/v2/ref/fusion/container.hpp>
+#include <boost/assign/v2/ref/fusion/nth_result_of.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace result_of{
+
+ template<typename Tag1,typename Tag2,typename Tnil>
+ struct empty_fusion : boost::mpl::apply1<
+ nth_result_of::fusion<Tag1, Tag2, Tnil>,
+ boost::mpl::vector0<>
+ >{};
+
+}// result_of
+
+ template<typename Tag1, typename Tag2, typename Tnil>
+ typename result_of::empty_fusion<Tag1, Tag2, Tnil>::type
+ fusion( keyword_aux::nil )
+ {
+ typedef typename result_of::empty_fusion<
+ Tag1,
+ Tag2,
+ Tnil
+ >::type result_;
+ return result_();
+ }
+
+ template<typename Tag1, typename Tag2>
+ typename result_of::empty_fusion<
+ Tag1,
+ Tag2,
+ fusion_aux::nil_arg_type
+ >::type
+ fusion( keyword_aux::nil )
+ {
+ typedef fusion_aux::nil_arg_type nil_arg_;
+ typedef typename result_of::empty_fusion<
+ Tag1,
+ Tag2,
+ nil_arg_
+ >::type result_;
+ return result_();
+ }
+
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/most_const.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/most_const.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -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_FUSION_MOST_CONST_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_MOST_CONST_ER_2010_HPP
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/assign/v2/detail/type_traits/same_remove_cv.hpp>
+#include <boost/assign/v2/ref/fusion/fwd.hpp>
+#include <boost/assign/v2/ref/fusion/root.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ // {U1,...,Un} is mapped to {T if Ui = T for all i, else T const}, if
+ // remove_cv<Ui>::type != remove_cv<Uj>::type
+ // for some i,j, otherwise the mapping is undefined.
+ template<typename L,typename T>
+ struct most_const : boost::lazy_enable_if<
+ v2::type_traits::same_remove_cv<typename L::head_value_type, T>,
+ boost::mpl::eval_if<
+ boost::is_const<T>,
+ boost::mpl::identity<T>,
+ most_const<
+ typename L::link_value_type,
+ typename L::head_value_type
+ >
+ >
+ >
+ {};
+
+ template<typename T>
+ struct most_const<
+ fusion_aux::root_type,
+ T
+ >{
+ typedef T type;
+ };
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/nil_arg.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/nil_arg.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,29 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_NIL_ARG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_NIL_ARG_ER_2010_HPP
+#include <boost/mpl/void.hpp>
+//#include <boost/mpl/aux_/na.hpp> // TODO
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ typedef boost::mpl::void_ nil_arg_type;
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/nth_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/nth_result_of.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -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_FUSION_NTH_RESULT_OF_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_NTH_RESULT_OF_ER_2010_HPP
+#include <boost/mpl/void.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/assign/v2/ref/wrapper/deduce_assign_tag.hpp>
+#include <boost/assign/v2/ref/fusion/fwd.hpp>
+#include <boost/assign/v2/ref/fusion/root.hpp>
+#include <boost/assign/v2/ref/fusion/nil_arg.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<typename Tag1, typename Tag2, typename Tnil>
+ struct empty
+ {
+ typedef fusion_aux::container<
+ 0,
+ typename fusion_aux::root_type,
+ Tag1,
+ Tag2,
+ Tnil
+ > type;
+ };
+
+ template<typename Tag1, typename Tag2, typename Tnil>
+ struct nth_result
+ {
+
+ typedef typename
+ fusion_aux::empty<Tag1, Tag2, Tnil>::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 Tag1, typename Tag2, typename Tnil = fusion_aux::nil_arg_type
+ >
+ struct fusion
+ {
+ template<typename Vec>
+ struct apply : boost::mpl::apply1<
+ fusion_aux::nth_result<Tag1, Tag2, Tnil>,
+ Vec
+ >{};
+ };
+
+}// nth_result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/policy.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/policy.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,64 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FUSION_POLICY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_POLICY_ER_2010_HPP
+#include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/assign/v2/ref/static_array/alloc/lazy_alloc.hpp>
+#include <boost/assign/v2/ref/fusion/fwd.hpp>
+#include <boost/assign/v2/ref/fusion/most_const.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ template<typename Tag2>
+ struct policy{};
+
+ template<>
+ struct policy<boost::use_default> : boost::mpl::always<
+ boost::mpl::empty_base
+ >{};
+
+ template<>
+ struct policy<alloc_tag::lazy_alloc>
+ {
+ template<typename N,typename L,typename Tag1,typename T>
+ struct apply
+ {
+ typedef alloc_tag::lazy_alloc tag2_;
+ typedef typename fusion_aux::most_const<L, T>::type most_c_;
+ typedef fusion_aux::container<
+ N::value,
+ L,
+ Tag1,
+ tag2_,
+ T
+ > derived_;
+ typedef static_array_aux::lazy_alloc<
+ N::value,
+ Tag1,
+ most_c_,
+ derived_
+ > type;
+ };
+
+ };
+
+}// fusion_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/fusion/root.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/fusion/root.hpp 2010-11-12 11:41:06 EST (Fri, 12 Nov 2010)
@@ -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_REF_FUSION_ROOT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_FUSION_ROOT_ER_2010_HPP
+#include <boost/mpl/void.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace fusion_aux{
+
+ typedef boost::mpl::void_ root_type;
+
+}// fusion_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