|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66536 - in sandbox/statistics/support/boost/assign/v2/put/compose: . common csv functor
From: erwann.rogard_at_[hidden]
Date: 2010-11-12 11:35:26
Author: e_r
Date: 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
New Revision: 66536
URL: http://svn.boost.org/trac/boost/changeset/66536
Log:
adding dir boost/assign/v2/put/compose
Added:
sandbox/statistics/support/boost/assign/v2/put/compose/
sandbox/statistics/support/boost/assign/v2/put/compose/common/
sandbox/statistics/support/boost/assign/v2/put/compose/common/common.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/common/forward_parameter.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/compose.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/csv/
sandbox/statistics/support/boost/assign/v2/put/compose/csv/composer.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/csv/csv.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/csv/forward_seq_arg.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/csv/held.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/csv/sub.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/functor/
sandbox/statistics/support/boost/assign/v2/put/compose/functor/composer.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_args.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_seq_args.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/functor/functor.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/functor/sub.hpp (contents, props changed)
sandbox/statistics/support/boost/assign/v2/put/compose/tag.hpp (contents, props changed)
Added: sandbox/statistics/support/boost/assign/v2/put/compose/common/common.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/common/common.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,15 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_COMMON_COMMON_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_COMMON_COMMON_ER_2010_HPP
+
+#include <boost/assign/v2/put/compose/common/common.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/common/forward_parameter.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/common/forward_parameter.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,93 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_FORWARD_PARAMETER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_FORWARD_PARAMETER_ER_2010_HPP
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/assign/v2/put/generic/result_of_modulo.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ template<std::size_t N,typename Pars, typename T,
+ bool exit = (N == boost::mpl::size<Pars>::value)>
+ struct result_of_forward_parameter
+ {
+ typedef typename boost::mpl::at_c<Pars, N>::type at_;
+ typedef result_of_modulo::generic<T> meta_;
+ typedef typename boost::mpl::apply1<
+ meta_,
+ at_
+ >::type new_t_;
+
+ typedef result_of_forward_parameter<N+1, Pars, new_t_> next_;
+
+ typedef typename next_::type type;
+
+ template<typename H>
+ static type call(H const& pars_holder, T const& t)
+ {
+ typedef boost::mpl::int_<N> int_;
+ return next_::call(
+ pars_holder,
+ t % pars_holder.static_lookup( int_() )
+ );
+ }
+
+ };
+
+ template<std::size_t N,typename Pars, typename T>
+ struct result_of_forward_parameter<N, Pars, T, true>
+ {
+
+ typedef T type;
+
+ template<typename H>
+ static type call(H const& pars_holder, T const& t)
+ {
+ return t;
+ }
+
+ };
+
+ template<typename Pars, typename T,typename C>
+ typename result_of_forward_parameter<0, Pars, T>::type
+ forward_parameter(
+ T const& object,
+ C const& c
+ )
+ {
+ typedef result_of_forward_parameter<0, Pars, T> caller_;
+ return caller_::call( c.parameters(), object );
+ }
+
+}// put_compose_aux
+namespace result_of{
+
+ template<typename T,typename Pars>
+ struct forward_parameter : put_compose_aux::result_of_forward_parameter<
+ 0,
+ Pars,
+ T
+ >{};
+
+}// result_of
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/compose.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/compose.hpp 2010-11-12 11:35:19 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_PUT_COMPOSE_COMPOSE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_COMPOSE_ER_2010_HPP
+
+#include <boost/assign/v2/put/compose/common/common.hpp>
+#include <boost/assign/v2/put/compose/functor/functor.hpp>
+#include <boost/assign/v2/put/compose/csv/csv.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/csv/composer.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/csv/composer.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,137 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_CSV_COMPOSER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_CSV_COMPOSER_ER_2010_HPP
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/vector/vector0.hpp>
+#include <boost/assign/v2/detail/config/limit_csv_arity.hpp>
+#include <boost/assign/v2/ref/anon/csv/assign_copy.hpp>
+#include <boost/assign/v2/ref/fusion/nth_result_of.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/put/compose/csv/held.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace put_compose_csv_aux{
+
+ template<typename Pars = boost::mpl::vector0<> >
+ class composer
+ {
+
+ typedef boost::use_default tag2_;
+ typedef v2::ref::assign_copy::nth_result_of::fusion<tag2_> meta1_;
+
+ public:
+
+ BOOST_STATIC_CONSTANT(
+ std::size_t,
+ static_parameters_size = boost::mpl::size<Pars>::value
+ );
+
+ typedef typename boost::mpl::apply1<meta1_, Pars>::type pars_cont_type;
+
+ composer(){}
+ explicit composer(pars_cont_type const& p) : pars_cont( p ){}
+
+ template<typename T>
+ struct modulo_result
+ {
+ typedef typename boost::mpl::push_back<
+ Pars,
+ T const
+ >::type new_;
+ typedef composer<new_> type;
+ };
+
+ template<typename T>
+ typename modulo_result<T>::type
+ operator%(T const& t)const
+ {
+ typedef typename modulo_result<T>::type result_;
+ return result_( this->pars_cont( t ) );
+ }
+
+ template<std::size_t N, typename U = boost::mpl::na>
+ struct result{
+ typedef put_compose_csv_aux::held<Pars, N, U> type;
+ };
+
+ typename result<0>::type
+ operator()()const
+ {
+ typedef typename result<0>::type result_;
+ namespace ns = ref::assign_copy;
+ return result_(
+ *this,
+ ns::csv_anon( _nil )
+ );
+ }
+
+#define MACRO1(N, U)\
+ namespace ns = ref::assign_copy;\
+ return result_( \
+ this->pars_cont, \
+ ns::csv_anon<U>( BOOST_PP_ENUM_PARAMS(N, _) ) \
+ );\
+/**/
+
+#define MACRO2(z, N, data)\
+ template<typename T>\
+ typename result<N, T>::type\
+ operator()( BOOST_PP_ENUM_PARAMS(N, T &_) )const \
+ { \
+ typedef typename result<N, T>::type result_;\
+ MACRO1( N, T )\
+ } \
+ template<typename T>\
+ typename result<N, T const>::type\
+ operator()( BOOST_PP_ENUM_PARAMS(N, T const &_) )const \
+ { \
+ typedef typename result<N, T const>::type result_;\
+ MACRO1( N, T const )\
+ } \
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ MACRO2,
+ ~
+)
+#undef MACRO1
+#undef MACRO2
+
+ protected:
+ pars_cont_type pars_cont;
+
+ };
+
+}// put_compose_csv_aux
+namespace adaptor{
+namespace{
+ put_compose_csv_aux::composer<> const _csv_put
+ = put_compose_csv_aux::composer<>();
+}
+}// adaptor
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/csv/csv.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/csv/csv.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -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_PUT_COMPOSE_CSV_CSV_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_CSV_CSV_ER_2010_HPP
+
+#include <boost/assign/v2/put/compose/csv/held.hpp>
+#include <boost/assign/v2/put/compose/csv/composer.hpp>
+#include <boost/assign/v2/put/compose/csv/forward_seq_arg.hpp>
+#include <boost/assign/v2/put/compose/csv/sub.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/csv/forward_seq_arg.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/csv/forward_seq_arg.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,67 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_FORWARD_SEQ_ARG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_FORWARD_SEQ_ARG_ER_2010_HPP
+#include <algorithm>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assign/v2/put/compose/csv/held.hpp>
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_csv_aux{
+
+ template<typename O>
+ class arg_forwarder : ref::wrapper<ref::assign_tag::copy, O const>
+ {
+ typedef ref::assign_tag::copy assign_tag_;
+ typedef ref::wrapper<assign_tag_, O const> super_t;
+
+ public:
+
+ arg_forwarder(){}
+ arg_forwarder(O const& object)
+ :super_t( object ){}
+
+ template<typename T>
+ void operator()(T& t)const
+ {
+ this->unwrap()( t );
+ }
+ template<typename T>
+ void operator()(T const& t)const
+ {
+ this->unwrap()( t );
+ }
+
+ };
+
+ template<typename O, typename Pars, std::size_t N, typename U>
+ void forward_seq_arg(O const& object, held<Pars, N, U> const& h)
+ {
+ typedef arg_forwarder<O> forwarder_;
+ forwarder_ f( object );
+ std::for_each(
+ boost::begin( h.sequence_arg() ),
+ boost::end( h.sequence_arg() ),
+ f
+ );
+
+ }
+
+}// put_compose_csv_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/csv/held.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/csv/held.hpp 2010-11-12 11:35:19 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_PUT_COMPOSE_CSV_HELD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_CSV_HELD_ER_2010_HPP
+#include <boost/mpl/apply.hpp>
+#include <boost/assign/v2/ref/anon/csv/assign_copy.hpp>
+#include <boost/assign/v2/ref/fusion/assign_copy.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace put_compose_csv_aux{
+
+ template<typename Pars, std::size_t N, typename U>
+ struct held
+ {
+ typedef boost::use_default tag2_;
+ typedef v2::ref::assign_copy::nth_result_of::fusion<tag2_> meta1_;
+ typedef typename boost::mpl::apply1<meta1_, Pars>::type pars_cont_type;
+ typedef typename v2::ref::assign_copy::nth_result_of::csv_anon<
+ N,
+ U
+ >::type seq_arg_cont_type;
+
+ held(){}
+ held(pars_cont_type const& p, seq_arg_cont_type const& s)
+ : pars_cont( p ), seq_arg( s ){}
+
+ pars_cont_type const& parameters()const
+ {
+ return this->pars_cont;
+ }
+
+ seq_arg_cont_type const& sequence_arg()const
+ {
+ return this->seq_arg;
+ }
+ seq_arg_cont_type& sequence_arg()
+ {
+ return this->seq_arg;
+ }
+
+ protected:
+ pars_cont_type pars_cont;
+ seq_arg_cont_type seq_arg;
+
+ };
+
+}// put_compose_csv_aux
+}// v2
+}// assign
+}// boost
+
+#endif
+
Added: sandbox/statistics/support/boost/assign/v2/put/compose/csv/sub.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/csv/sub.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,39 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_CSV_SUB_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_CSV_SUB_ER_2010_HPP
+#include <boost/assign/v2/put/compose/common/forward_parameter.hpp>
+#include <boost/assign/v2/put/compose/csv/forward_seq_arg.hpp>
+#include <boost/assign/v2/put/compose/csv/held.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_csv_aux{
+
+ template<typename V, typename Pars, std::size_t N, typename U>
+ V& operator|(
+ V& v,
+ put_compose_csv_aux::held<Pars, N, U> const& c
+ )
+ {
+ put_compose_csv_aux::forward_seq_arg(
+ put_compose_aux::forward_parameter<Pars>( put( v ), c ),
+ c
+ );
+ return v;
+ }
+
+}// put_compose_csv_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/functor/composer.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/functor/composer.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,210 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_COMPOSER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_COMPOSER_ER_2010_HPP
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/seq/for_each_product.hpp>
+#include <boost/preprocessor/seq/first_n.hpp>
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/vector/vector0.hpp>
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/mpl/vector.hpp>
+
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp> // TODO
+#include <boost/assign/v2/detail/pp/args.hpp>
+#include <boost/assign/v2/detail/pp/params.hpp>
+#include <boost/assign/v2/detail/pp/seq.hpp>
+
+#include <boost/assign/v2/detail/functor/crtp_unary_and_up.hpp>
+#include <boost/assign/v2/ref/fusion/assign_copy.hpp>
+#include <boost/assign/v2/ref/fusion_matrix/container.hpp>
+#include <boost/assign/v2/ref/fusion_matrix/nth_result_of.hpp>
+#include <boost/assign/v2/put/compose/tag.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ template<
+ typename Pars = boost::mpl::vector0<>,
+ typename SeqArgs = boost::mpl::vector0<>,
+ bool enable_pars = (boost::mpl::size<SeqArgs>::value == 0)
+ >
+ class composer;
+
+ template<typename Pars, typename SeqArgs, bool enable_pars>
+ struct composer_result
+ {
+ template<typename Args>
+ struct apply
+ {
+ typedef typename boost::mpl::push_back<
+ SeqArgs,
+ Args
+ >::type new_;
+ typedef composer<Pars, new_> type;
+ };
+ };
+
+
+ template<typename Pars, typename SeqArgs, bool enable_pars>
+ class composer
+ : public functor_aux::crtp_unary_and_up<
+ composer<Pars, SeqArgs, enable_pars>,
+ composer_result<Pars, SeqArgs, enable_pars>
+ >
+ {
+ typedef boost::use_default tag2_;
+ typedef v2::ref::assign_copy::nth_result_of::fusion<tag2_> meta1_;
+ typedef ref::assign_tag::copy tag1_;
+ typedef ref::nth_result_of::fusion_matrix<
+ tag1_,
+ boost::use_default
+ > meta2_;
+
+ typedef functor_aux::crtp_unary_and_up<
+ composer,
+ composer_result<Pars, SeqArgs, enable_pars>
+ > super_t;
+
+ public:
+
+ BOOST_STATIC_CONSTANT(
+ std::size_t,
+ static_parameters_size = boost::mpl::size<Pars>::value
+ );
+
+ BOOST_STATIC_CONSTANT(
+ std::size_t,
+ static_sequence_args_size = boost::mpl::size<SeqArgs>::value
+ );
+
+ typedef typename boost::mpl::apply1<meta1_, Pars>::type pars_cont_type;
+ typedef typename boost::mpl::apply1<
+ meta2_,
+ SeqArgs
+ >::type seq_args_cont_type;
+
+ composer(){}
+ composer(
+ pars_cont_type const& p,
+ seq_args_cont_type const& s
+ )
+ : pars_cont( p ),
+ seq_args_cont( s ){}
+
+ template<typename T>
+ struct modulo_result
+ {
+ typedef typename boost::mpl::push_back<
+ Pars,
+ T const
+ >::type new_;
+ typedef composer<new_, SeqArgs> type;
+ };
+
+ template<typename T>
+ typename boost::lazy_enable_if_c<
+ enable_pars,
+ modulo_result<T>
+ >::type
+ operator%(T const& t)const
+ {
+ typedef typename modulo_result<T>::type result_;
+ return result_( this->pars_cont( t ), this->seq_args_cont );
+ }
+
+ template<typename Args>
+ struct result : boost::mpl::apply1<
+ composer_result<Pars, SeqArgs, enable_pars>,
+ Args
+ >
+ {};
+
+ using super_t::operator();
+
+ typename result<
+ boost::mpl::vector0<>
+ >::type
+ operator()()const
+ {
+ typedef boost::mpl::vector0<> args_;
+ typedef typename result<args_>::type result_;
+ return result_( this->pars_cont, this->seq_args_cont() );
+ }
+
+#define MACRO1( z, n, data ) \
+ ( BOOST_PP_CAT(_,n) ) \
+/**/
+
+#define MACRO2(z, N1, data) \
+ template<BOOST_PP_ENUM_PARAMS(N1, typename U)> \
+ typename result< \
+ boost::mpl::vector<BOOST_PP_ENUM_PARAMS(N1, U)> \
+ >::type \
+ impl( BOOST_PP_ENUM_BINARY_PARAMS(N1, U, &_) )const{ \
+ typedef boost::mpl::vector<BOOST_PP_ENUM_PARAMS(N1, U)> args_; \
+ typedef typename result<args_>::type result_; \
+ return result_( \
+ this->pars_cont, \
+ this->seq_args_cont( BOOST_PP_ENUM_PARAMS(N1, _) ) \
+ ); \
+ } \
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ MACRO2,
+ ~
+)
+#undef MACRO1
+#undef MACRO2
+
+ pars_cont_type const& parameters()const{
+ return this->pars_cont;
+ }
+ seq_args_cont_type const& sequence_args()const{
+ return this->seq_args_cont;
+ }
+
+ protected:
+
+ pars_cont_type pars_cont;
+ seq_args_cont_type seq_args_cont;
+
+ };
+
+}// put_compose_aux
+namespace adaptor{
+namespace{
+ put_compose_aux::composer<> const _put = put_compose_aux::composer<>();
+}
+}// adaptor
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_args.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_args.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,125 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_FORWARD_ARGS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_FORWARD_ARGS_ER_2010_HPP
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/int.hpp>
+
+//#include <boost/assign/v2/detail/keyword/default.hpp>
+#include <boost/assign/v2/detail/config/limit_arity.hpp>
+#include <boost/assign/v2/ref/fusion_matrix/container.hpp>
+#include <boost/assign/v2/ref/wrapper/framework.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ template<
+ std::size_t N, typename L,typename Tag1, typename Tag2,
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ BOOST_ASSIGN_V2_LIMIT_ARITY,
+ typename T,
+ boost::mpl::na
+ )
+ >
+ class args : ref::wrapper<
+ ref::assign_tag::copy,
+ ref::fusion_matrix_aux::container<N, L, Tag1, Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, T)
+ > const
+ >
+ {
+ typedef ref::fusion_matrix_aux::container<N, L, Tag1, Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, T)
+ > value_;
+ typedef ref::assign_tag::copy assign_tag_;
+ typedef ref::wrapper<assign_tag_, value_ const> super_t;
+
+ public:
+
+ args(){};
+
+ args(value_ const& v) : super_t( v ){}
+
+ value_ const& value()const{ return this->unwrap(); }
+
+ };
+
+ template<
+ std::size_t N, typename L,typename Tag1, typename Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, typename T)
+ >
+ args<N, L, Tag1, Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, T)
+ >
+ make_args(
+ ref::fusion_matrix_aux::container<N,L,Tag1, Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, T)
+ > const& v
+ ){
+ typedef args<N,L,Tag1, Tag2,
+ BOOST_PP_ENUM_PARAMS(BOOST_ASSIGN_V2_LIMIT_ARITY, T)
+ > result_;
+ return result_( v );
+ }
+
+#define MACRO1(z, n, data) \
+ BOOST_PP_COMMA_IF(n)\
+ input.value().static_column(\
+ boost::mpl::int_<n>()\
+ )\
+/**/
+
+#define MACRO2(z, K, data)\
+ template<\
+ typename O,\
+ std::size_t N, typename L,typename Tag1, typename Tag2\
+ BOOST_PP_ENUM_TRAILING_PARAMS(K, typename T)\
+ >\
+ O const&\
+ forward_args(\
+ O const& object,\
+ put_compose_aux::args<N, L, Tag1, Tag2 \
+ BOOST_PP_ENUM_TRAILING_PARAMS(K, T)\
+ > const& input\
+ )\
+ {\
+ return object(\
+ BOOST_PP_REPEAT(K, MACRO1, ~)\
+ );\
+ }\
+/**/
+
+
+BOOST_PP_REPEAT(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ MACRO2,
+ ~
+)
+
+#undef MACRO1
+#undef MACRO2
+
+}// put_compose_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_seq_args.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/functor/forward_seq_args.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,63 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_FORWARD_SEQ_ARGS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_FORWARD_SEQ_ARGS_ER_2010_HPP
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/assign/v2/put/compose/functor/forward_args.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ template<std::size_t I, std::size_t N, bool exit = (I == N)>
+ struct forward_seq_args_caller
+ {
+
+ template<typename T,typename H>
+ static void call(T const& object, H const& h)
+ {
+ typedef boost::mpl::int_<I> index_;
+ forward_args(
+ object,
+ put_compose_aux::make_args(
+ h.sequence_args().static_row( index_() )
+ )
+ );
+ typedef forward_seq_args_caller<I+1, N> next_;
+ next_::call( object, h );
+ }
+
+ };
+
+ template<std::size_t I, std::size_t N>
+ struct forward_seq_args_caller<I, N, true>
+ {
+ template<typename T, typename H>
+ static void call(T const& object, H const& h){}
+ };
+
+ template<typename T, typename H>
+ void forward_seq_args(T const& object, H const& h)
+ {
+ typedef put_compose_aux::forward_seq_args_caller<
+ 0,
+ H::static_sequence_args_size
+ > caller_;
+ caller_::call( object, h );
+ }
+
+}// put_compose_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/functor/functor.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/functor/functor.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -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_PUT_COMPOSE_FUNCTOR_FUNCTOR_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_FUNCTOR_FUNCTOR_ER_2010_HPP
+
+#include <boost/assign/v2/put/compose/functor/composer.hpp>
+#include <boost/assign/v2/put/compose/functor/forward_args.hpp>
+#include <boost/assign/v2/put/compose/functor/forward_seq_args.hpp>
+#include <boost/assign/v2/put/compose/functor/sub.hpp>
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/functor/sub.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/functor/sub.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_COMPOSE_SUB_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_SUB_ER_2010_HPP
+#include <boost/assign/v2/put/sub/make.hpp>
+#include <boost/assign/v2/put/generic/generic.hpp>
+#include <boost/assign/v2/put/compose/common/forward_parameter.hpp>
+#include <boost/assign/v2/put/compose/functor/composer.hpp>
+#include <boost/assign/v2/put/compose/functor/forward_seq_args.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ template<typename V, typename Pars, typename SeqArgs, bool enable_pars>
+ V& operator|(
+ V& v,
+ put_compose_aux::composer<Pars, SeqArgs, enable_pars> const& c
+ )
+ {
+ forward_seq_args(
+ put_compose_aux::forward_parameter<Pars>(
+ put( v ),
+ c
+ ),
+ c
+ );
+ return v;
+ }
+
+}// put_compose_aux
+}// v2
+}// assign
+}// boost
+
+#endif
Added: sandbox/statistics/support/boost/assign/v2/put/compose/tag.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/boost/assign/v2/put/compose/tag.hpp 2010-11-12 11:35:19 EST (Fri, 12 Nov 2010)
@@ -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_PUT_COMPOSE_TAG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_COMPOSE_TAG_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_compose_aux{
+
+ struct compose_tag{};
+
+}// put_compose_aux
+}// 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