Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67842 - in sandbox/statistics/support/boost/assign/v2/ref: . array array/alloc array/csv array/functor list_tuple list_tuple/cpp03 list_tuple/cpp0x tuple
From: erwann.rogard_at_[hidden]
Date: 2011-01-08 21:07:17


Author: e_r
Date: 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
New Revision: 67842
URL: http://svn.boost.org/trac/boost/changeset/67842

Log:
add to boost/assign/v2/ref
Added:
   sandbox/statistics/support/boost/assign/v2/ref/array/
   sandbox/statistics/support/boost/assign/v2/ref/array.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc/
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant_fwd.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy_fwd.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/csv/
   sandbox/statistics/support/boost/assign/v2/ref/array/csv.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/csv/make.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/csv/nth_result_of.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/functor/
   sandbox/statistics/support/boost/assign/v2/ref/array/functor.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/functor/make.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/functor/nth_result_of.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/functor/tag2.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/impl_traits.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/interface.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/array/tag1.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/common.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/container.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp03/
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp03/container.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp0x/
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp0x/container.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/extraction.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/keyword.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/list_tuple/nth_result_of.hpp (contents, props changed)
   sandbox/statistics/support/boost/assign/v2/ref/tuple/
   sandbox/statistics/support/boost/assign/v2/ref/tuple/cpp0x.hpp (contents, props changed)

Added: sandbox/statistics/support/boost/assign/v2/ref/array.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array.hpp 2011-01-08 21:07:11 EST (Sat, 08 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_ARRAY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ER_2010_HPP
+
+#include <boost/assign/v2/ref/array/csv.hpp>
+#include <boost/assign/v2/ref/array/functor.hpp>
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/alloc.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/alloc.hpp 2011-01-08 21:07:11 EST (Sat, 08 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_ARRAY_ALLOC_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ALLOC_ER_2010_HPP
+
+#include <boost/assign/v2/ref/array/alloc/fast_alloc.hpp>
+#include <boost/assign/v2/ref/array/alloc/lazy_alloc.hpp>
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,65 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_ALLOC_INSTANT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ALLOC_INSTANT_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper.hpp>
+#include <boost/assign/v2/ref/array/interface.hpp>
+#include <boost/assign/v2/ref/array/alloc/instant_fwd.hpp>
+#include <boost/assign/v2/ref/array/impl_traits.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+
+ template<std::size_t N, typename Tag, typename T>
+ class instant_alloc : public array_aux::interface<
+ typename array_aux::impl_traits<N, T>::array_type,
+ instant_alloc<N, Tag, T>
+ >
+ {
+ typedef typename array_aux::impl_traits<
+ N,
+ T
+ >::array_type impl_;
+
+ public:
+
+ instant_alloc(){}
+
+ template<typename L>
+ instant_alloc(const L& l){
+ assign_array(
+ this->array,
+ l
+ );
+ }
+
+ impl_& impl(){
+ return this->array;
+ }
+
+ impl_ const & impl()const{
+ return this->array;
+ }
+
+ protected:
+ mutable impl_ array;
+
+ };
+
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/alloc/instant_fwd.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_ARRAY_ALLOC_INSTANT_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ALLOC_INSTANT_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace alloc_tag{
+ struct instant_alloc{};
+}// alloc_tag
+namespace array_aux{
+ template<std::size_t N, typename Tag, typename T> class instant_alloc;
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,81 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_ALLOC_LAZY_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ALLOC_LAZY_ER_2010_HPP
+#include <boost/shared_ptr.hpp>
+#include <boost/assign/v2/ref/wrapper.hpp>
+#include <boost/assign/v2/ref/fusion/assign_array.hpp>
+#include <boost/assign/v2/ref/array/alloc/lazy_fwd.hpp>
+#include <boost/assign/v2/ref/array/interface.hpp>
+#include <boost/assign/v2/ref/array/impl_traits.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+
+ template<std::size_t N,typename Tag, typename T, typename D>
+ class lazy_alloc : public array_aux::interface<
+ typename array_aux::impl_traits<N, T>::array_type,
+ lazy_alloc<N,Tag,T,D>
+ >
+ {
+ typedef typename array_aux::impl_traits<
+ N,
+ T
+ >::array_type impl_;
+
+ typedef boost::mpl::int_<N> size_;
+
+ void alloc_if()const{
+ if(!this->ptr){
+ return this->alloc();
+ }
+ }
+
+ void alloc()const{
+ this->ptr = smart_ptr_(new impl_);
+ assign_array(
+ *this->ptr,
+ static_cast<const D&>(*this)
+ );
+ }
+
+ typedef array_aux::interface<impl_, lazy_alloc> super_t;
+
+ public:
+
+ impl_& impl(){
+ this->alloc_if();
+ return (*this->ptr);
+ }
+
+ impl_ const & impl()const{
+ this->alloc_if();
+ return (*this->ptr);
+ }
+
+ using super_t::operator[];
+
+ private:
+
+ typedef boost::shared_ptr<impl_> smart_ptr_;
+ mutable smart_ptr_ ptr;
+
+ };
+
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/alloc/lazy_fwd.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_ARRAY_ALLOC_LAZY_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_ALLOC_LAZY_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace alloc_tag{
+ struct lazy_alloc{};
+}// alloc_tag
+namespace array_aux{
+ template<std::size_t N, typename Tag, typename T, typename D>
+ class lazy_alloc;
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/csv.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/csv.hpp 2011-01-08 21:07:11 EST (Sat, 08 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_ARRAY_CSV_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_CSV_ER_2010_HPP
+
+#include <boost/assign/v2/ref/array/csv/nth_result_of.hpp>
+#include <boost/assign/v2/ref/array/csv/make.hpp>
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/csv/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/csv/make.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,148 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_CSV_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_CSV_MAKE_ER_2010_HPP
+#include <boost/assign/v2/detail/keyword/nil.hpp>
+#include <boost/assign/v2/ref/array/alloc/instant.hpp>
+#include <boost/assign/v2/ref/array/csv/nth_result_of.hpp>
+
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/assign/v2/detail/type_traits/or_const.hpp>
+#else
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/assign/v2/detail/config/limit_csv_arity.hpp>
+#endif
+
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace result_of{
+
+ template<typename T>
+ struct empty_csv_array
+ : nth_result_of::csv_array<0, T>{};
+
+}// result_of
+
+ template<typename T>
+ typename result_of::empty_csv_array<T>::type
+ csv_array( keyword_aux::nil )
+ {
+ typedef typename result_of::empty_csv_array<T>::type result_;
+ return result_();
+ }
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+namespace csv_array_aux{
+
+ template<std::size_t n,typename R>
+ void assign(R& r){}
+
+ template<std::size_t n, typename U, typename R, typename... Args>
+ void assign(R& r, U& u, Args&...args)
+ {
+ typedef typename R::wrapper_type wrapper_;
+ r.rebind( n, u );
+ csv_array_aux::assign<n + 1>(r, args...);
+ }
+
+ template<typename U, typename... Args>
+ struct result
+ {
+ BOOST_STATIC_CONSTANT(std::size_t, n = 1 + sizeof...(Args) );
+ typedef typename nth_result_of::csv_array<
+ n,
+ U
+ >::type type;
+
+ static type call(U& u, Args&...args)
+ {
+ type result;
+ csv_array_aux::assign<0>(result, u, args...);
+ return result;
+ }
+
+ };
+
+}// csv_array_aux
+
+ template<typename T,typename...TArgs>
+ typename boost::lazy_disable_if<
+ v2::type_traits::or_const<T, TArgs...>,
+ csv_array_aux::result<T, TArgs...>
+ >::type
+ csv_array( T& t, TArgs&...args )
+ {
+ typedef csv_array_aux::result<T, TArgs...> caller_;
+ return caller_::call( t, args... );
+ }
+
+ template<typename T, typename...TArgs>
+ typename csv_array_aux::result<T const, TArgs const...>::type
+ csv_array( T const& t, TArgs const&...args )
+ {
+ typedef csv_array_aux::result<T const, TArgs const...> caller_;
+ return caller_::call( t, args... );
+ }
+
+#else
+
+#define MACRO1(z, i, data) r.rebind(i, BOOST_PP_CAT(data, i) );
+#define MACRO2(z, n, U)\
+namespace csv_array_aux{\
+ template<typename T>\
+ typename nth_result_of::csv_array<n, T>::type\
+ csv_array( BOOST_PP_ENUM_PARAMS(n, T& _) )\
+ {\
+ typedef typename nth_result_of::csv_array<n, T>::type result_;\
+ result_ r;\
+ BOOST_PP_REPEAT( n, MACRO1, _ )\
+ return r;\
+ }\
+}\
+ template<typename T>\
+ typename nth_result_of::csv_array<n, T>::type\
+ csv_array( BOOST_PP_ENUM_PARAMS(n, T& _) ){ \
+ return csv_array_aux::csv_array<T>( BOOST_PP_ENUM_PARAMS(n, _) );\
+ }\
+ template<typename T>\
+ typename nth_result_of::csv_array<n, T const>::type\
+ csv_array( BOOST_PP_ENUM_PARAMS(n, T const& _) ){ \
+ return csv_array_aux::csv_array<T const>( BOOST_PP_ENUM_PARAMS(n, _) );\
+ }\
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ MACRO2,
+ ~
+)
+#undef MACRO1
+#undef MACRO2
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/csv/nth_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/csv/nth_result_of.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_CSV_NTH_RESULT_OF_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_CSV_NTH_RESULT_OF_ER_2010_HPP
+#include <boost/mpl/empty_base.hpp>
+#include <boost/assign/v2/ref/array/alloc/instant_fwd.hpp>
+#include <boost/assign/v2/ref/array/tag1.hpp>
+
+#include <boost/assign/v2/ref/array/impl_traits.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+ typedef boost::use_default csv_tag2_;
+}// array_aux
+namespace nth_result_of{
+
+ template<std::size_t N, typename T>
+ struct csv_array
+ {
+ typedef ref::array_tag1_ tag1_;
+ typedef array_aux::instant_alloc<N, tag1_, T> type;
+ };
+
+}// nth_result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/functor.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/functor.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,18 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_FUNCTOR_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_FUNCTOR_ER_2010_HPP
+
+#include <boost/assign/v2/ref/array/functor/make.hpp>
+#include <boost/assign/v2/ref/array/functor/nth_result_of.hpp>
+#include <boost/assign/v2/ref/array/functor/tag2.hpp>
+
+#endif
+

Added: sandbox/statistics/support/boost/assign/v2/ref/array/functor/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/functor/make.hpp 2011-01-08 21:07:11 EST (Sat, 08 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_ARRAY_FUNCTOR_MAKE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_FUNCTOR_MAKE_ER_2010_HPP
+#include <boost/assign/v2/ref/fusion/make.hpp>
+#include <boost/assign/v2/ref/fusion/assign_array.hpp>
+#include <boost/assign/v2/ref/array/functor/nth_result_of.hpp>
+#include <boost/assign/v2/ref/array/functor/tag2.hpp>
+#include <boost/assign/v2/ref/array/alloc/lazy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace result_of{
+
+ template<typename T>
+ struct empty_array
+ : nth_result_of::array<0, T>{};
+
+ template<typename T>
+ struct array
+ : nth_result_of::array<1, T>{};
+
+}// result_of
+
+ template<typename T>
+ typename result_of::empty_array<T>::type
+ array( keyword_aux::nil const& )
+ {
+ typedef ref::array_tag1_ tag1_;
+ typedef array_aux::functor_tag2_ tag2_;
+ return ref::fusion<tag1_, tag2_,T>( v2::_nil );
+ }
+
+ template<typename T>
+ typename result_of::array<T>::type
+ array(T& t)
+ {
+ return array<T>( v2::_nil )( t );
+ }
+
+ template<typename T>
+ typename result_of::array<T const>::type
+ array(T const & t)
+ {
+ return array<T const>( v2::_nil )( t );
+ }
+
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/functor/nth_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/functor/nth_result_of.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,54 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_FUNCTOR_NTH_RESULT_OF_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_FUNCTOR_NTH_RESULT_OF_ER_2010_HPP
+#include <boost/assign/v2/ref/fusion/nth_result_of.hpp>
+#include <boost/assign/v2/ref/array/functor/tag2.hpp>
+#include <boost/assign/v2/ref/array/tag1.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+
+ template<typename T>
+ struct empty_array : fusion_aux::empty<
+ array_tag1_,
+ array_aux::functor_tag2_,
+ T
+ >{};
+
+ template<std::size_t N, typename T>
+ struct recursive_result
+ {
+ typedef typename recursive_result<N-1, T>::type previous_;
+ typedef typename previous_::template result<T>::type type;
+ };
+
+ template<typename T>
+ struct recursive_result<0, T>
+ : empty_array<T>{};
+
+}// array_aux
+namespace nth_result_of{
+
+ template<std::size_t N, typename T>
+ struct array
+ : array_aux::recursive_result<N, T>
+ {};
+
+}// nth_result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/functor/tag2.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/functor/tag2.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,26 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_FUNCTOR_TAG2_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_FUNCTOR_TAG2_ER_2010_HPP
+#include <boost/assign/v2/ref/array/alloc/lazy_fwd.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+ typedef ref::alloc_tag::lazy_alloc functor_tag2_;
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/impl_traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/impl_traits.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_ARRAY_IMPL_TRAITS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_IMPL_TRAITS_ER_2010_HPP
+#include <boost/array.hpp>
+#include <boost/assign/v2/ref/wrapper.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+
+ template<std::size_t N, typename T, typename Tag = ref::assign_tag::copy>
+ struct impl_traits
+ {
+ typedef T value_type;
+ typedef Tag assign_tag;
+ typedef typename ref::wrapper<assign_tag, value_type> wrapper_type;
+ typedef boost::array<wrapper_type,N> array_type;
+ };
+
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/interface.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/interface.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,212 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ARRAY_INTERFACE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ARRAY_INTERFACE_ER_2010_HPP
+#include <algorithm>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/int.hpp>
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/call_traits.hpp>
+
+#include <boost/range.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/range/algorithm/for_each.hpp>
+#include <boost/range/iterator_range.hpp> //iterator_range_detail::
+
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/crtp.hpp>
+#include <boost/assign/v2/ref/detail/unwrap/range.hpp>
+/* #include <boost/assign/v2/detail/relational_op.hpp> */
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace array_aux{
+
+ template<typename Impl>
+ struct interface_traits{
+
+ typedef Impl impl_;
+ typedef impl_ const cimpl_;
+
+ typedef typename Impl::value_type wrapper_;
+
+ typedef typename ref::result_of::unwrap_range<impl_>::type range_;
+ typedef typename ref::result_of::unwrap_range<cimpl_>::type crange_;
+ typedef typename boost::unwrap_reference<wrapper_>::type value_type;
+ typedef typename boost::add_reference<value_type>::type reference;
+ typedef typename boost::call_traits<
+ reference>::const_reference const_reference;
+ typedef typename boost::range_iterator<range_>::type iterator;
+ typedef typename boost::range_iterator<crange_>::type const_iterator;
+
+ // wrappers
+ #ifndef BOOST_MSVC
+ typedef typename boost::range_size<impl_>::type size_type;
+ #endif
+ #ifdef BOOST_MSVC
+ typedef std::size_t size_type;
+ #endif
+ typedef typename boost::range_difference<range_>::type difference_type;
+
+ };
+
+ template<typename Impl, typename D>
+ class interface
+ /*:
+ public relational_op_aux::crtp<
+ interface<Impl, D>
+ >
+ */
+ {
+
+ typedef interface_traits<Impl> traits_;
+ typedef typename traits_::wrapper_ wrapper_;
+ typedef typename traits_::impl_ impl_;
+ typedef typename traits_::cimpl_ cimpl_;
+ typedef interface<Impl, D> this_;
+
+ public:
+ typedef wrapper_ wrapper_type;
+ typedef typename traits_::value_type value_type;
+ typedef typename traits_::iterator iterator;
+ typedef typename traits_::const_iterator const_iterator;
+ typedef typename traits_::size_type size_type;
+ typedef typename traits_::difference_type difference_type;
+ typedef typename traits_::reference reference;
+ typedef typename traits_::const_reference const_reference;
+ typedef typename boost::call_traits<value_type>::param_type param_type;
+
+ BOOST_STATIC_CONSTANT(size_type, static_size = Impl::static_size);
+
+ iterator begin()
+ {
+ return boost::begin( this->wrappers() );
+ }
+ iterator end()
+ {
+ return boost::end( this->wrappers() );
+ }
+ const_iterator begin()const
+ {
+ return boost::begin( this->wrappers() );
+ }
+ const_iterator end()const
+ {
+ return boost::end( this->wrappers() );
+ }
+
+ size_type size() const
+ {
+ return this->wrappers().size();
+ }
+ bool empty() const
+ {
+ return this->wrappers().empty();
+ }
+
+ void rebind(size_type i, reference t)
+ {
+ return (this->wrappers())[i].rebind( t );
+ }
+
+ reference operator[](size_type i)
+ {
+ return (this->wrappers())[i].unwrap();
+ }
+ const_reference operator[](size_type i)const
+ {
+ return (this->wrappers())[i].unwrap();
+ }
+
+ reference front()
+ {
+ return (this->wrappers()).front().unwrap();
+ }
+ const_reference front() const
+ {
+ return (this->wrappers()).front().unwrap();
+ }
+ reference back()
+ {
+ return (this->wrappers()).back().unwrap();
+ }
+ const_reference back() const
+ {
+ return (this->wrappers()).back().unwrap();
+ }
+
+ void assign(param_type val)
+ {
+ typedef boost::mpl::int_<0> int_;
+ this->assign_impl( val, int_() );
+ }
+
+/*
+ // Relational op
+ template<typename R>
+ bool equal_to(const R& r)const{
+ return ::boost::iterator_range_detail::equal(
+ (*this), r );
+ }
+
+ template<typename R>
+ bool less_than(const R& r)const{
+ return ::boost::iterator_range_detail::less_than(
+ (*this), r );
+ }
+*/
+ protected:
+
+ void assign_impl(param_type val, boost::mpl::int_<static_size>)
+ {
+ /* exit */
+ }
+
+ template<int i>
+ void assign_impl(param_type val, boost::mpl::int_<i>)
+ {
+ this->wrappers()[i] = val;
+ typedef boost::mpl::int_<i+1> next_;
+ this->assign_impl( val, next_() );
+ }
+
+ public:
+
+ typename traits_::range_ unwrap()
+ {
+ return ref::unwrap_range( this->wrappers() );
+ }
+ typename traits_::crange_ unwrap()const{
+ return ref::unwrap_range( this->wrappers() );
+ }
+
+ impl_& wrappers(){
+ return static_cast<D&>(*this).impl();
+ }
+
+ cimpl_& wrappers()const{
+ return static_cast<const D&>(*this).impl();
+ }
+
+ };
+
+}// array_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/array/tag1.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/array/tag1.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ANON_TAG1_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_ANON_TAG1_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace ref{
+ typedef assign_tag::copy array_tag1_;
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_REF_ANON_TAG1_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_LIST_TUPLE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_ER_2010_HPP
+
+#include <boost/assign/v2/ref/list_tuple/container.hpp>
+#include <boost/assign/v2/ref/list_tuple/keyword.hpp>
+#include <boost/assign/v2/ref/list_tuple/nth_result_of.hpp>
+
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/common.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/common.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_LIST_TUPLE_COMMON_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_COMMON_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_tuple_aux{
+
+ struct root{};
+
+ template<typename T>
+ struct link
+ {
+
+ link(T const& t) : unlink( t ){}
+
+ T const& unlink;
+ };
+
+}// list_tuple_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_COMMON_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/container.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,18 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TUPLE_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_CONTAINER_ER_2010_HPP
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <boost/assign/v2/ref/list_tuple/cpp0x/container.hpp>
+#else
+#include <boost/assign/v2/ref/list_tuple/cpp03/container.hpp>
+#endif
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_CONTAINER_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp03/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp03/container.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,252 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TUPLE_CPP03_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_CPP03_CONTAINER_ER_2010_HPP
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition.hpp>
+
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/config.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/static_assert.hpp>
+
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#include <boost/assign/v2/detail/functor/crtp_unary_and_up.hpp>
+#include <boost/assign/v2/ref/list_tuple/extraction.hpp>
+#include <boost/assign/v2/ref/list_tuple/common.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_tuple_aux{
+
+ typedef ::boost::tuples::null_type null_type;
+ typedef ::boost::mpl::na na_type;
+
+#define params_default(T, U)\
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(\
+ BOOST_ASSIGN_V2_LIMIT_ARITY,\
+ T,\
+ U\
+ )\
+/**/
+#define params(T)\
+ BOOST_PP_ENUM_PARAMS(\
+ BOOST_ASSIGN_V2_LIMIT_ARITY,\
+ T\
+ )\
+/**/
+
+ template<typename T> struct tuple_value : boost::add_reference<T>{};
+ template<> struct tuple_value<na_type>{ typedef null_type type; };
+
+ template<typename T>
+ struct tuple_param{
+ typedef typename boost::tuples::access_traits<
+ typename tuple_value<T>::type
+ >::parameter_type type;
+ };
+
+ template<typename T> struct vec_value{ typedef T type; };
+ template<> struct vec_value<na_type>{ typedef na_type type; };
+
+ template<params( typename T )>
+ struct tuple
+ {
+#define MACRO(z, n, T)\
+ typename list_tuple_aux::tuple_value<\
+ BOOST_PP_CAT(T, n)\
+ >::type\
+/**/
+ typedef boost::tuples::tuple<
+ BOOST_PP_ENUM(
+ BOOST_ASSIGN_V2_LIMIT_ARITY,
+ MACRO,
+ T
+ )
+ > type;
+#undef MACRO
+
+ BOOST_STATIC_CONSTANT(
+ int,
+ size = ::boost::tuples::length<type>::value
+ );
+
+ };
+
+ template<typename NewState>
+ struct result
+ {
+ template<params_default(typename T, na_type)>
+ struct apply : NewState::template result<params(T)>{};
+ };
+
+ template<int N, typename L, params_default(typename T, na_type)>
+ class container;
+
+ template<int N, typename L,
+ params_default(typename T, na_type)
+ >
+ struct meta_result
+ {
+
+ typedef list_tuple_aux::container<N, L, params(T)> this_;
+
+ template<params_default(typename U, na_type)>
+ struct apply
+ {
+ typedef container<
+ N + 1,
+ this_,
+ params(U)
+ > type;
+ };
+
+ };
+
+ template<int N, typename L,
+ params_default(typename T, na_type)>
+ struct traits
+ {
+ typedef list_tuple_aux::container<N, L, params(T)> cont_;
+ typedef typename list_tuple_aux::tuple<params(T)>::type tuple_;
+ typedef list_tuple_aux::extraction<N, L, tuple_, cont_> extraction_;
+ typedef list_tuple_aux::meta_result<N, L, params(T)> meta_result_;
+ typedef functor_aux::crtp_unary_and_up<
+ cont_,
+ boost::mpl::unpack_args<meta_result_>
+ > crtp_;
+ typedef typename boost::mpl::eval_if_c<
+ N == 0,
+ boost::mpl::identity< boost::mpl::empty_base >,
+ boost::mpl::identity< link<L> >
+ >::type link_;
+ };
+
+ template<int N, typename L, params(typename T)>
+ class container :
+ public list_tuple_aux::traits<N, L, params(T)>::link_,
+ public list_tuple_aux::traits<N, L, params(T)>::crtp_,
+ public list_tuple_aux::traits<N, L, params(T)>::extraction_
+ {
+ typedef list_tuple_aux::traits<N, L, params(T)> traits_;
+ typedef typename traits_::link_ link_;
+ typedef typename traits_::meta_result_ meta_result_;
+ typedef typename traits_::tuple_ tuple_;
+ typedef typename traits_::crtp_ crtp_;
+
+ tuple_ tuple;
+
+ public:
+ tuple_ const& get_tuple()const{ return this->tuple; }
+ link_ const& get_link()const{ return (*this); }
+
+ typedef int size_type;
+ BOOST_STATIC_CONSTANT( size_type, static_get_size = N );
+ BOOST_STATIC_CONSTANT(
+ size_type,
+ static_tuple_size = tuple_::size
+ );
+
+ container()
+ {
+ BOOST_STATIC_ASSERT( N == 0 );
+ }
+
+ explicit container(const L& l)
+ : link_( l )
+ {
+ BOOST_STATIC_ASSERT( N > 0 );
+
+ }
+
+#define MACRO1(T,R)\
+ typename list_tuple_aux::tuple_param<T>::type R\
+/**/
+#define MACRO(z, n, T)\
+ MACRO1(\
+ BOOST_PP_CAT(T,BOOST_PP_INC(n)),\
+ BOOST_PP_CAT(_,BOOST_PP_INC(n))\
+ )\
+ = boost::tuples::detail::cnull()\
+/**/
+ explicit container(
+ const L& l,
+ MACRO1(T0,_0) // (*)
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_DEC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ MACRO,
+ T
+ )
+ )
+ : link_( l )
+ , tuple(
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, _)
+ )
+ {
+ BOOST_STATIC_ASSERT( N > 0 );
+ }
+#undef MACRO1
+#undef MACRO
+
+ template<params_default(typename U, na_type)>
+ struct result : meta_result_::template apply<params(U)>{};
+
+ using crtp_::operator();
+
+ typename result<>::type
+ operator()()const{
+ typedef typename result<>::type result_;
+ return result_( *this );
+ }
+
+#define MACRO(z, n, data)\
+ template<BOOST_PP_ENUM_PARAMS(n, typename U)>\
+ typename result<BOOST_PP_ENUM_PARAMS(n, U)>::type\
+ impl( BOOST_PP_ENUM_BINARY_PARAMS(n, U, &_) )const\
+ {\
+ typedef typename result<\
+ BOOST_PP_ENUM_PARAMS(n, U)\
+ >::type result_type;\
+ return result_type(\
+ *this,\
+ BOOST_PP_ENUM_PARAMS(n, _)\
+ );\
+ }\
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ MACRO,
+ ~
+)
+
+ };
+
+#undef MACRO
+#undef params
+#undef params_default
+
+}// list_tuple_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp0x/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/cpp0x/container.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,128 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TUPLE_CPP0X_CONTAINER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_CPP0X_CONTAINER_ER_2010_HPP
+#include <utility>
+
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/assign/v2/ref/tuple/cpp0x.hpp>
+#include <boost/assign/v2/ref/list_tuple/extraction.hpp>
+#include <boost/assign/v2/ref/list_tuple/common.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_tuple_aux{
+
+ template<int N, typename L, typename...Args> class container;
+
+ template<int N, typename L, typename...Args>
+ struct meta_result
+ {
+
+ typedef container<N, L, Args...> this_;
+
+ template<typename... Args1>
+ struct apply
+ {
+ typedef container<
+ N + 1,
+ this_,
+ Args1...
+ > type;
+ };
+
+ };
+
+ template<typename NewState>
+ struct result
+ {
+ template<typename...Args>
+ struct apply : NewState::template result<Args...>{};
+ };
+
+ template<int N, typename L, typename...Args>
+ class container :
+ boost::mpl::eval_if_c<
+ N == 0,
+ boost::mpl::identity< boost::mpl::empty_base >,
+ boost::mpl::identity< link<L> >
+ >::type,
+ public list_tuple_aux::extraction<
+ N, L,
+ tuple_aux::container<Args...>,
+ list_tuple_aux::container<N, L, Args...>
+ >
+ {
+ typedef link<L> link_;
+ typedef meta_result<N, L, Args...> meta_result_;
+
+ typedef tuple_aux::container<Args...> tuple_;
+ tuple_ tuple;
+
+ public:
+ tuple_ const& get_tuple()const{ return this->tuple; }
+ link_ const& get_link()const{ return *this; }
+
+ typedef int size_type;
+ BOOST_STATIC_CONSTANT( size_type, static_get_size = N );
+ BOOST_STATIC_CONSTANT(
+ size_type,
+ static_tuple_size = sizeof...(Args)
+ );
+
+ container()
+ {
+ BOOST_STATIC_ASSERT( N == 0 );
+ }
+
+ explicit container(
+ const L& l,
+ Args&&... args
+ )
+ : link_( l ),
+ tuple(
+ std::forward<Args>( args )...
+ )
+
+ {
+ BOOST_STATIC_ASSERT( N > 0 );
+ }
+
+ template<typename... Args1>
+ struct result : meta_result_::template apply<Args1...>{};
+
+ template<typename... Args1>
+ typename result<Args1...>::type
+ operator()( Args1&&...args1 )const
+ {
+ typedef typename result<Args1...>::type result_type;
+ return result_type(
+ *this,
+ std::forward<Args1>( args1 )...
+ );
+ }
+
+ };
+
+}// list_tuple_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/extraction.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/extraction.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_LIST_TUPLE_EXTRACTION_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_EXTRACTION_ER_2010_HPP
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace list_tuple_aux{
+
+ template<std::size_t N, typename L, typename T, typename D>
+ class extraction
+ {
+ typedef D const& result_of_derived_;
+ result_of_derived_ derived()const
+ {
+ return static_cast<
+ result_of_derived_
+ >( *this );
+ }
+
+ public:
+
+ template<int I>
+ struct is_head : boost::mpl::bool_< I + 1 == N >{};
+
+ template<int I>
+ struct link_get_result : L::template get_result<I>{};
+
+ template<int I>
+ struct get_result : boost::mpl::eval_if<
+ is_head<I>,
+ boost::mpl::identity<
+ T const&
+ >,
+ link_get_result<I>
+ >{};
+
+ template<int I>
+ typename boost::lazy_enable_if<
+ is_head<I>,
+ get_result<I>
+ >::type
+ get(boost::mpl::int_<I> index)const
+ {
+ return this->derived().get_tuple();
+ }
+
+ template<int I>
+ typename boost::lazy_disable_if<
+ is_head<I>,
+ get_result<I>
+ >::type
+ get( boost::mpl::int_<I> index )const
+ {
+ return this->derived().get_link().unlink.get( index );
+ }
+
+ };
+
+}// list_tuple_aux
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_EXTRACTION_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/keyword.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/keyword.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,35 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TUPLE_KEYWORD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_KEYWORD_ER_2010_HPP
+#include <boost/assign/v2/ref/list_tuple/container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace result_of{
+
+ typedef list_tuple_aux::container<0, list_tuple_aux::root> list_tuple;
+
+}// result_of
+namespace
+{
+
+ result_of::list_tuple const
+ list_tuple = result_of::list_tuple();
+
+}
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_KEYWORD_ER_2010_HPP

Added: sandbox/statistics/support/boost/assign/v2/ref/list_tuple/nth_result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/list_tuple/nth_result_of.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -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_LIST_TUPLE_NTH_RESULT_OF_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_LIST_TUPLE_NTH_RESULT_OF_ER_2010_HPP
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/assign/v2/ref/list_tuple/container.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace nth_result_of{
+
+ class list_tuple
+ {
+ typedef list_tuple_aux::root root_;
+ typedef list_tuple_aux::container<0, root_> state_;
+
+ struct forward_op{
+
+ template<typename NewState, typename Vec>
+ struct apply{
+ typedef list_tuple_aux::result<NewState> meta_;
+ typedef boost::mpl::unpack_args< meta_ > g_;
+ typedef typename boost::mpl::apply1<
+ g_,
+ Vec
+ >::type type;
+ };
+
+ };
+
+ public:
+
+ template<typename VecTypes>
+ struct apply : boost::mpl::fold<
+ VecTypes,
+ state_,
+ forward_op
+ >{};
+
+ };
+
+}// nth_result_of
+}// ref
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_REF_LIST_TUPLE_NTH_RESULT_OF_ER_2010_HPP
+
+

Added: sandbox/statistics/support/boost/assign/v2/ref/tuple/cpp0x.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/ref/tuple/cpp0x.hpp 2011-01-08 21:07:11 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,123 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_TUPLE_CPP0X_ER_2010_HPP
+#define BOOST_ASSIGN_V2_REF_DETAIL_TUPLE_CPP0X_ER_2010_HPP
+#include <utility>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/assign/v2/ref/tuple/cpp0x.hpp>
+// The tuple below avoids the returns reference to a temporary error.
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace ref{
+namespace tuple_aux{
+
+ template<typename ...Args>
+ struct container
+ {
+ container(){}
+ };
+
+ template<typename T, bool is_ref = boost::is_reference<T>::value>
+ struct traits
+ {
+ typedef typename boost::add_reference<T>::type ref_type;
+ typedef ref_type value_type;
+ };
+
+ template<typename T>
+ struct traits<T, false>
+ {
+ typedef typename boost::add_const<T>::type value_type;
+ typedef typename boost::add_reference<value_type>::type ref_type;
+ };
+
+ template<typename T, typename ...Args>
+ struct container<T, Args...> : container<Args...>
+ {
+ typedef container<Args...> super_t;
+
+ container(T&& t, Args&&...args)
+ : super_t(
+ std::forward<Args>( args )...
+ ),
+ value(
+ std::forward<T>( t )
+ ) {}
+
+ typedef tuple_aux::traits<T> traits_;
+ typedef typename traits_::value_type value_type;
+
+ value_type value;
+
+ };
+
+ template<int index, int acc, typename...Args>
+ struct get_helper{};
+
+ template<int index, int acc, typename T, typename... Args>
+ struct get_helper<index, acc, T, Args...>
+ : get_helper<index, acc + 1, Args...>{};
+
+ template<int index, typename T, typename... Args>
+ struct get_helper<index, index, T, Args...>
+ {
+ typedef container<T, Args...> container_;
+ typedef ref::tuple_aux::traits<T> traits_;
+ typedef typename traits_::ref_type type;
+
+ template<typename U>
+ static type call(U const& u)
+ {
+ container_ const& t = u;
+ return t.value;
+ }
+ };
+
+}// tuple_aux
+namespace result_of{
+
+ template<typename... Args>
+ struct tuple
+ {
+ typedef tuple_aux::container<Args...> type;
+ };
+
+ template<int index, typename... Args>
+ struct get_tuple : tuple_aux::get_helper<index, 0 , Args...>{};
+
+}// result_of
+
+ template<typename ... Args>
+ typename result_of::tuple<Args...>::type
+ tuple(Args&&...args)
+ {
+ typedef typename result_of::tuple<Args...>::type result_;
+ return result_( std::forward<Args>( args )... );
+ }
+
+ template<int index, typename... Args>
+ typename result_of::get_tuple<index, Args...>::type
+ get(tuple_aux::container<Args...> const& t)
+ {
+ typedef result_of::get_tuple<index, Args...> caller_;
+ return caller_::call( t );
+ }
+
+}// ref
+ using ref::get;
+}// 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