Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72364 - in sandbox/assign_v2/boost/assign/v2: include put put/cpp03
From: erwann.rogard_at_[hidden]
Date: 2011-06-02 20:48:20


Author: e_r
Date: 2011-06-02 20:48:19 EDT (Thu, 02 Jun 2011)
New Revision: 72364
URL: http://svn.boost.org/trac/boost/changeset/72364

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/include/csv.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/include/delay_put.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/cpp03/delay_csv_put.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/delay_put.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/include/csv.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/include/csv.hpp 2011-06-02 20:48:19 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,14 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_INCLUDE_CSV_ER_2011_HPP
+#define BOOST_ASSIGN_V2_INCLUDE_CSV_ER_2011_HPP
+#include <boost/assign/v2/interpreter/csv.hpp>
+
+#endif // BOOST_ASSIGN_V2_INCLUDE_CSV_ER_2011_HPP

Added: sandbox/assign_v2/boost/assign/v2/include/delay_put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/include/delay_put.hpp 2011-06-02 20:48:19 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,14 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_INCLUDE_DELAY_PUT_ER_2011_HPP
+#define BOOST_ASSIGN_V2_INCLUDE_DELAY_PUT_ER_2011_HPP
+#include <boost/assign/v2/put/delay_put.hpp>
+
+#endif // BOOST_ASSIGN_V2_INCLUDE_DELAY_PUT_ER_2011_HPP

Added: sandbox/assign_v2/boost/assign/v2/put/cpp03/delay_csv_put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/cpp03/delay_csv_put.hpp 2011-06-02 20:48:19 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,191 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_CPP03_DELAY_CSV_PUT_ER_2011_HPP
+#define BOOST_ASSIGN_V2_PUT_CPP03_DELAY_CSV_PUT_ER_2011_HPP
+#include <boost/assign/v2/support/config/limit_csv_arity.hpp>
+#include <boost/assign/v2/support/config/limit_tuple_arity.hpp>
+#include <boost/assign/v2/support/pp/parameter_list.hpp>
+#include <boost/assign/v2/put/delay_csv_put.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace interpreter_aux{
+namespace result_of{
+
+ template<typename T>
+ struct delay_csv_put_elem
+ : boost::add_reference<T>
+ {};
+
+ template<>
+ struct delay_csv_put_elem<boost::tuples::null_type>
+ {
+ typedef boost::tuples::null_type type;
+ };
+
+ template<
+ typename Options,
+ int I,
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ BOOST_ASSIGN_V2_LIMIT_CPP03_TUPLE_ARITY,
+ typename T,
+ boost::tuples::null_type
+ )
+ >
+ struct delay_csv_put
+ {
+#define BOOST_ASSIGN_V2_MACRO(z, i, data)\
+ typename delay_csv_put_elem<BOOST_PP_CAT(T,i)>::type\
+/**/
+ typedef boost::tuple<
+ BOOST_PP_ENUM(
+ BOOST_ASSIGN_V2_LIMIT_CPP03_TUPLE_ARITY,
+ BOOST_ASSIGN_V2_MACRO,
+ ~
+ )
+ > tuple_;
+#undef BOOST_ASSIGN_V2_MACRO
+ typedef typename result_of::csv_deque<tuple_>::type cont_;
+ typedef put_for_each_adapter<
+ typename boost::add_const<cont_>::type,
+ Options,
+ I
+ > type;
+
+};
+}// result_of
+
+#define BOOST_ASSIGN_V2_DELAY_CSV_PUT_NESTED_ITER(z, N, SeqU)\
+ template<\
+ typename Options,\
+ int I,\
+ BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ >\
+ typename boost::lazy_enable_if_c<\
+ I == BOOST_PP_SEQ_SIZE(SeqU),\
+ result_of::delay_csv_put<\
+ Options,\
+ I,\
+ BOOST_PP_SEQ_ENUM(SeqU)\
+ >\
+ >::type\
+ delay_csv_put\
+ (\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ typedef result_of::delay_csv_put<\
+ Options,\
+ I,\
+ BOOST_PP_SEQ_ENUM(SeqU)\
+ > meta_;\
+ typedef typename meta_::tuple_ tuple_;\
+ typedef typename meta_::type result_;\
+ return result_(\
+ Options(),\
+ csv_deque<\
+ tuple_,\
+ I,\
+ BOOST_PP_SEQ_ENUM(SeqU)\
+ >(\
+ BOOST_PP_ENUM_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
+ )\
+ );\
+ }\
+ template<int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)>\
+ typename boost::lazy_enable_if_c<\
+ I == BOOST_PP_SEQ_SIZE(SeqU),\
+ result_of::delay_csv_put<\
+ empty_list_option_,\
+ I,\
+ BOOST_PP_SEQ_ENUM(SeqU)\
+ >\
+ >::type\
+ delay_csv_put\
+ (\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ return delay_csv_put<\
+ empty_list_option_,\
+ I,\
+ BOOST_PP_SEQ_ENUM(SeqU)\
+ >(\
+ BOOST_PP_ENUM_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
+ );\
+ }\
+/**/
+
+#define BOOST_ASSIGN_V2_DELAY_CSV_PUT_ITER(r, SeqU)\
+ BOOST_PP_REPEAT_FROM_TO(\
+ 1,\
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),\
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_NESTED_ITER,\
+ SeqU\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_DELAY_CSV_PUT_CONST_NON_CONST_OVERLOAD(z, I, data)\
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(\
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_ITER,\
+ BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_DELAY_CSV_PUT_OVERLOAD(z, I, pos)\
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_ITER(\
+ ~,\
+ BOOST_ASSIGN_V2_CSV_SEQ2(pos, I)\
+ )\
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_CONST_NON_CONST_OVERLOAD,
+ ~
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_OVERLOAD,
+ 0
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_DELAY_CSV_PUT_OVERLOAD,
+ 1
+)
+
+#undef BOOST_ASSIGN_V2_DELAY_CSV_PUT_NESTED_ITER
+#undef BOOST_ASSIGN_V2_DELAY_CSV_PUT_ITER
+#undef BOOST_ASSIGN_V2_DELAY_CSV_PUT_CONST_NON_CONST_OVERLOAD
+#undef BOOST_ASSIGN_V2_DELAY_CSV_PUT_OVERLOAD
+
+}// interpreter_aux
+using interpreter_aux::delay_csv_put;
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CPP03_DELAY_CSV_PUT_ER_2011_HPP

Added: sandbox/assign_v2/boost/assign/v2/put/delay_put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/delay_put.hpp 2011-06-02 20:48:19 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,163 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_DELAY_PUT_ER_2011_HPP
+#define BOOST_ASSIGN_V2_PUT_DELAY_PUT_ER_2011_HPP
+#include <boost/assign/v2/support/pp/ignore.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/support/pp/forward.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#endif
+
+namespace boost{
+namespace assign{
+namespace v2{
+//[syntax_delay_put
+namespace interpreter_aux{
+
+//<-
+ template<typename R>
+ struct delay_put_super
+ {
+ typedef boost::iterator_range<
+ typename boost::range_iterator<
+ typename type_traits::param<R>::type
+ >::type
+ > type;
+ };
+//->
+
+ template<
+ typename R, typename O = empty_list_option_/*<-*/, int I = 0/*->*/
+ >
+ struct put_for_each_adapter/*<-*/
+ : delay_put_super<R>::type/*->*/
+ {
+//<-
+ typedef typename delay_put_super<R>::type super_t;
+
+ public:
+
+ put_for_each_adapter( BOOST_ASSIGN_V2_FORWARD_PARAM(R, range) )
+ :super_t( BOOST_ASSIGN_V2_FORWARD_ARG(R, range) )
+ {}
+
+ put_for_each_adapter(
+ O const& o, BOOST_ASSIGN_V2_FORWARD_PARAM(R, range)
+ )
+ :super_t( BOOST_ASSIGN_V2_FORWARD_ARG(R, range) ),
+ options_( o )
+ {}
+
+ put_for_each_adapter(super_t const& super, O const& o)
+ :super_t( super ), options_( o )
+ {}
+
+ O const& options()const{ return this->options_; }
+
+ private:
+ put_for_each_adapter();
+ O options_;
+//->
+ };
+
+ template<typename O = empty_list_option_>
+ struct put_adapter
+ {
+//<-
+ put_adapter(){}
+ put_adapter(O const& o)
+ :options_( o )
+ {}
+//->
+
+ template<typename R>
+ put_for_each_adapter<R, O>
+ for_each( /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/R&& range/*<-*/)
+ BOOST_ASSIGN_V2_FORWARD_PARAM( R, range )/*->*/ )const/*<-*/
+ {
+ typedef put_for_each_adapter<R, O> result_;
+ return result_( this->options_, range );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<int I, typename R>
+ put_for_each_adapter<R, O, I>
+ for_each( /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/R&& range/*<-*/)
+ BOOST_ASSIGN_V2_FORWARD_PARAM( R, range )/*->*/ )const/*<-*/
+ {
+ typedef put_for_each_adapter<R, O, I> result_;
+ return result_( this->options_, range );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<typename Options>
+ put_adapter<Options>
+ operator%(Options const& options) const/*<-*/
+ {
+ return put_adapter<Options>( options );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+//<-
+#if! BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ // R const&
+
+ template<typename R>
+ put_for_each_adapter<R const, O>
+ for_each( R const& range )const
+ {
+ typedef put_for_each_adapter<R const, O> result_;
+ return result_( this->options_, range );
+ }
+
+ template<int I, typename R>
+ put_for_each_adapter<R const, O, I>
+ for_each( R const& range )const
+ {
+ typedef put_for_each_adapter<R const, O, I> result_;
+ return result_( this->options_, range );
+ }
+#endif
+ private:
+ O options_;
+//->
+ };
+
+ template<typename C, typename R, typename O>
+ C& operator|(C& cont, put_for_each_adapter<R, O> const& a)/*<-*/
+ {
+ return (
+ put( cont ) % a.options()
+ ).for_each( a ).container();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<typename C, typename R, typename O, int I>
+ C& operator|(C& cont, put_for_each_adapter<R, O, I> const& a)/*<-*/
+ {
+ return (
+ put( cont ) % a.options()
+ ).template for_each<I>( a ).container();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+}// interpreter_aux
+
+//<-
+namespace{
+//->
+ const interpreter_aux::put_adapter<> _delay_put/*<-*/
+ = interpreter_aux::put_adapter<>()/*->*/;
+//<-
+}
+//->
+//]
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_DELAY_PUT_ER_2011_HPP


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