Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70938 - in sandbox/assign_v2/boost/assign/v2: . detail/functor interpreter put
From: erwann.rogard_at_[hidden]
Date: 2011-04-03 11:13:33


Author: e_r
Date: 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
New Revision: 70938
URL: http://svn.boost.org/trac/boost/changeset/70938

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/detail/functor/iterate.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/
   sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/delayed_csv_put.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/put.hpp (contents, props changed)
Text files modified:
   sandbox/assign_v2/boost/assign/v2/pipe.hpp | 2 --
   1 files changed, 0 insertions(+), 2 deletions(-)

Added: sandbox/assign_v2/boost/assign/v2/detail/functor/iterate.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/detail/functor/iterate.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -0,0 +1,43 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to the //
+// Boost Software License, Version 1.0. (See accompanying file //
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_DETAIL_FUNCTOR_ITERATE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_DETAIL_FUNCTOR_ITERATE_ER_2010_HPP
+#include <cstddef>
+
+namespace boost{
+namespace assign{
+namespace v2{
+//syntax_detail_functor_iterate
+namespace functor_aux{
+
+ struct iterate
+ {
+
+ typedef std::size_t result_type;
+
+ iterate():i( 0 ){}
+ iterate( result_type i_ ):i( i_ ){}
+
+ result_type operator()()const{ return this->i++; }
+
+ typedef iterate type;
+
+ private:
+ mutable result_type i;
+
+ };
+
+}// functor_aux
+//]
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_DETAIL_FUNCTOR_ITERATE_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -0,0 +1,98 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_INTERPRETER_CSV_ER_2010_HPP
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_ER_2010_HPP
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
+#include <boost/assign/v2/interpreter/fwd.hpp>
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#else
+#include <boost/assign/v2/detail/config/limit_csv_arity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+namespace boost{
+namespace assign{
+namespace v2{
+//[syntax_interpreter_csv
+namespace interpreter_aux{
+
+ template<typename C, typename F, typename MTag, typename DTag, typename D>
+ void csv(
+ interpreter_crtp<C, F, MTag, DTag, D> const& interpreter
+ )/*<-*/
+ {
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+//<-
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
+
+ template<typename C, typename F, typename MTag, typename DTag, typename D>
+ void csv(
+ interpreter_crtp<C, F, MTag, DTag, D> const& interpreter,
+ T&& t, Args&&... args
+ )/*<-*/
+ {
+ return csv( interpreter( t ), std::forward<Args>( args )... );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+//]
+#else
+#define BOOST_ASSIGN_V2_MACRO1(z, i, data) BOOST_PP_CAT(T, i) data
+#define BOOST_ASSIGN_V2_MACRO2(z, i, data) ( BOOST_PP_CAT(_, i) )
+#define BOOST_ASSIGN_V2_MACRO3(z, N, data)\
+\
+ template<\
+ typename C, typename F, typename MTag, typename DTag, typename D\
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)\
+ >\
+ void csv( \
+ interpreter_crtp<C, F, MTag, DTag, D> const& interpreter\
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, T, & _)\
+ )\
+ {\
+ interpreter BOOST_PP_REPEAT(N, BOOST_ASSIGN_V2_MACRO2, ~ );\
+ }\
+\
+ template<\
+ typename C, typename F, typename MTag, typename DTag, typename D\
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)\
+ >\
+ void csv( \
+ interpreter_crtp<C, F, MTag, DTag, D> const& interpreter\
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, T, const & _)\
+ )\
+ {\
+ interpreter BOOST_PP_REPEAT(N, BOOST_ASSIGN_V2_MACRO2, ~ );\
+ }\
+\
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ BOOST_ASSIGN_V2_MACRO3,
+ ~
+)
+#undef BOOST_ASSIGN_V2_MACRO1
+#undef BOOST_ASSIGN_V2_MACRO2
+#undef BOOST_ASSIGN_V2_MACRO3
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+}// interpreter_aux
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_INTERPRETER_CSV_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/pipe.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/pipe.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/pipe.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -10,8 +10,6 @@
 #ifndef BOOST_ASSIGN_V2_PIPE_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PIPE_ER_2010_HPP
 
-#include <boost/assign/v2/pipe/chain.hpp>
-#include <boost/assign/v2/pipe/convert.hpp>
 #include <boost/assign/v2/pipe/csv_put.hpp>
 
 #endif // BOOST_ASSIGN_V2_PIPE_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -0,0 +1,189 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_CSV_PUT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CSV_PUT_ER_2010_HPP
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/interpreter/csv.hpp>
+#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/option/data_generator.hpp>
+#include <boost/assign/v2/option/list.hpp>
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/utility/enable_if.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#else
+#include <boost/assign/v2/detail/config/limit_csv_arity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+namespace boost{
+namespace assign{
+namespace v2{
+//[syntax_csv_put
+namespace interpreter_aux{
+
+ template<typename F>
+ struct csv_suitable
+ : ::boost::mpl::true_
+ {};
+
+ template<typename T, typename K, typename M>
+ struct csv_suitable<
+ functor_aux::pair<T, K, M>
+ >
+ : ::boost::mpl::false_
+ {};
+
+namespace result_of{
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ struct if_make_csv_suitable : ::boost::mpl::identity<
+ put_interpreter<C, F, MTag, DTag>
+ >
+ {};
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ struct else_make_csv_suitable : result_of::option_data_generator<
+ put_interpreter<C, F, MTag, DTag>, C, value_
+ >
+ {};
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ struct make_csv_suitable : ::boost::mpl::eval_if<
+ csv_suitable<F>,
+ if_make_csv_suitable<C, F, MTag, DTag>,
+ else_make_csv_suitable<C, F, MTag, DTag>
+ >{};
+
+}// result_of
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ typename result_of::if_make_csv_suitable<C, F, MTag, DTag>::type
+ make_csv_suitable(
+ put_interpreter<C, F, MTag, DTag> const& interpreter,
+ boost::mpl::true_ suitable
+ )
+ {
+ return interpreter;
+ }
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ typename result_of::else_make_csv_suitable<C, F, MTag, DTag>::type
+ make_csv_suitable(
+ put_interpreter<C, F, MTag, DTag> const& interpreter,
+ boost::mpl::false_ suitable
+ )
+ {
+ return interpreter % ( _data = _value );
+ }
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ typename result_of::make_csv_suitable<C, F, MTag, DTag>::type
+ make_csv_suitable( put_interpreter<C, F, MTag, DTag> const& interpreter)
+ {
+ return make_csv_suitable(
+ interpreter,
+ typename csv_suitable<F>::type()
+ );
+ }
+
+ template<typename C>
+ void csv_put( C& cont ){}
+
+//<-
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
+
+
+ template<typename C, typename T, typename Args>
+ typename boost::disable_if< is_option_listable<T> >::type
+ csv_put( C& cont, T&& t, Args&&... args)
+ {
+ csv(
+ make_csv_suitable( put( cont ) ),
+ std::forward<T>( t ),
+ std::forward<Args>( args )...
+ );
+ }
+
+ template<typename C, typename Options, typename Args>
+ typename boost::enable_if< is_option_listable<Options> >::type
+ csv_put( C& cont, Options&& options, Args&&... args)
+ {
+ csv(
+ make_csv_suitable(
+ options.apply( put( cont ) )
+ ),
+ std::forward<Args>( args )...
+ );
+ }
+
+//]
+#else
+#define BOOST_ASSIGN_V2_MACRO1(z, i, data) BOOST_PP_CAT(T, i) data
+#define BOOST_ASSIGN_V2_MACRO2(z, i, data) ( BOOST_PP_CAT(_, i) )
+#define BOOST_ASSIGN_V2_MACRO3(z, N, data)\
+ template<typename C, BOOST_PP_ENUM_PARAMS(N, typename T)>\
+ typename boost::disable_if< is_option_listable<T0> >::type\
+ csv_put( C& cont, BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _) )\
+ {\
+ csv(\
+ make_csv_suitable( put( cont ) ) \
+ , BOOST_PP_ENUM_PARAMS(N, _)\
+ );\
+ }\
+ template<typename C, typename Os, BOOST_PP_ENUM_PARAMS(N, typename T)>\
+ typename boost::enable_if< is_option_listable<Os> >::type\
+ csv_put( C& cont, Os const& options, BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _) )\
+ {\
+ csv(\
+ make_csv_suitable( put( cont ) % options ) \
+ , BOOST_PP_ENUM_PARAMS(N, _)\
+ );\
+ }\
+ template<typename C, BOOST_PP_ENUM_PARAMS(N, typename T)>\
+ typename boost::disable_if< is_option_listable<T0> >::type\
+ csv_put( C& cont, BOOST_PP_ENUM_BINARY_PARAMS(N, T, const & _) )\
+ {\
+ csv(\
+ make_csv_suitable( put( cont ) ) \
+ , BOOST_PP_ENUM_PARAMS(N, _)\
+ );\
+ }\
+ template<typename C, typename Os, BOOST_PP_ENUM_PARAMS(N, typename T)>\
+ typename boost::enable_if< is_option_listable<Os> >::type\
+ csv_put( C& cont, Os const& options, BOOST_PP_ENUM_BINARY_PARAMS(N, T, const & _) )\
+ {\
+ csv(\
+ make_csv_suitable( put( cont ) % options ) \
+ , BOOST_PP_ENUM_PARAMS(N, _)\
+ );\
+ }\
+/**/
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ BOOST_ASSIGN_V2_MACRO3,
+ ~
+)
+#undef BOOST_ASSIGN_V2_MACRO1
+#undef BOOST_ASSIGN_V2_MACRO2
+#undef BOOST_ASSIGN_V2_MACRO3
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+}// interpreter_aux
+using interpreter_aux::csv_put;
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CSV_PUT_ER_2010_HPP

Added: sandbox/assign_v2/boost/assign/v2/put/delayed_csv_put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/delayed_csv_put.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -0,0 +1,219 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DELAYED_CSV_PUT_HPP_ER_2010
+#define BOOST_ASSIGN_V2_PUT_DELAYED_CSV_PUT_HPP_ER_2010
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#include <boost/assign/v2/detail/keyword.hpp>
+#include <boost/assign/v2/detail/traits.hpp>
+#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/option/list.hpp>
+#include <boost/assign/v2/option/data_generator.hpp>
+#include <boost/assign/v2/ref/array/as_arg_list.hpp>
+#include <boost/assign/v2/ref/array/csv_array.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/vector/vector0.hpp>
+#if !BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <boost/assign/v2/detail/config/limit_csv_arity.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/repetition.hpp>
+#endif
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+//[syntax_pipe_csv_put
+namespace interpreter_aux{
+
+ typedef ref::array_aux::size_type arg_list_size_type;
+
+ template<typename H, typename Tail, arg_list_size_type N, typename U>
+ struct arg_list : list_option<H, Tail>/*<-*/
+ {
+ typedef list_option<H, Tail> list_option_;
+ typedef typename v2::ref::nth_result_of::csv_array<
+ N, U
+ >::type arg_list_cont_type; //notice it's arg, not args
+
+ arg_list(){}
+ arg_list(list_option_ const& l, arg_list_cont_type const& a)
+ : list_option_( l ),
+ arg_list_cont_( a )
+ {}
+
+ arg_list_cont_type const& arg_list_cont() const
+ {
+ return this->arg_list_cont_;
+ }
+
+ protected:
+ arg_list_cont_type arg_list_cont_;
+
+ }/*->*/;
+
+ template<
+ typename Head/*<-*/ = typename empty_list_option::head_type/*->*/,
+ typename Tail/*<-*/ = typename empty_list_option::tail_type/*->*/
+ >
+ class arg_list_generator : public list_option<Head, Tail>/*<-*/
+ {
+
+ typedef ::boost::mpl::na na_;
+ typedef list_option<Head, Tail> list_option_;
+
+ public:
+
+ arg_list_generator(){}
+ explicit arg_list_generator(Tail const& t, Head const& h)
+ : list_option_( t, h )
+ {}
+
+ template<typename Option>
+ struct modulo_result
+ {
+ typedef arg_list_generator<Option, arg_list_generator> type;
+ };
+
+ template<typename Option>
+ typename modulo_result<Option>::type
+ operator%(Option option)const
+ {
+ typedef typename modulo_result<Option>::type result_;
+ return result_( *this, option );
+ }
+
+ template<arg_list_size_type N, typename U = na_>
+ struct result{
+ typedef interpreter_aux::arg_list<Head, Tail, N, U> type;
+ };
+
+ typename result<0>::type
+ operator()()const
+ {
+ typedef typename result<0>::type result_;
+ return result_(
+ *this,
+ ref::csv_array<na_>( _nil )
+ );
+ }
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ protected:
+ template<typename T, typename...Args>
+ typename result<sizeof...(Args) + 1, T>::type
+ impl(T& t, Args&...args)const
+ {
+ typedef typename result<sizeof...(Args)+1, T>::type result_;
+ namespace ns = ref::assign_copy;
+ return result_(*this, ref::csv_array( t, args... ) );
+ }
+
+ public:
+
+ template<typename T, typename...Args>
+ typename boost::lazy_disable_if<
+ v2::type_traits::or_const<T, Args...>,
+ result<sizeof...(Args)+1, T>
+ >::type
+ operator()(T& t, Args&...args)const
+ {
+ return this->impl(t, args...);
+ }
+
+ template<typename T, typename...Args>
+ typename result<sizeof...(Args)+1, T const>::type
+ operator()(T const& t, Args const&...args)const
+ {
+ return this->impl(t, args...);
+ }
+
+#else
+
+#define BOOST_ASSIGN_V2_MACRO1(N, U)\
+ return result_( \
+ *this, \
+ ref::csv_array<U>( BOOST_PP_ENUM_PARAMS(N, _) ) \
+ );\
+/**/
+#define BOOST_ASSIGN_V2_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_;\
+ BOOST_ASSIGN_V2_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_;\
+ BOOST_ASSIGN_V2_MACRO1( N, T const )\
+ } \
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ BOOST_ASSIGN_V2_MACRO2,
+ ~
+)
+#undef BOOST_ASSIGN_V2_MACRO1
+#undef BOOST_ASSIGN_V2_MACRO2
+
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ }/*->*/;
+
+ template<
+ typename C, typename H, typename T,
+ arg_list_size_type N, typename U
+ >
+ C& operator|(C& cont, interpreter_aux::arg_list<H, T, N, U> const& arg_list)/*<-*/
+ {
+ typedef typename ::boost::mpl::if_c<
+ !container_aux::is_map<C>::value,
+ use_default_,
+ value_
+ >::type arg_;
+
+ v2::ref::as_arg_list(
+ arg_list.apply(
+ put( cont ) % ( _data = arg_() )
+ ),
+ arg_list.arg_list_cont()
+ );
+ return cont;
+
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+}// interpreter_aux
+//<-
+namespace{
+//->
+
+ interpreter_aux::arg_list_generator<> const _csv_put/*<-*/
+ = interpreter_aux::arg_list_generator<>()/*->*/;
+
+//<-
+}
+//->
+//]
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_DELAYED_CSV_PUT_HPP_ER_2010
+

Added: sandbox/assign_v2/boost/assign/v2/put/put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/put.hpp 2011-04-03 11:13:31 EDT (Sun, 03 Apr 2011)
@@ -0,0 +1,141 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_PUT_ER_2010_HPP
+#include <boost/assign/v2/interpreter/crtp.hpp>
+#include <boost/assign/v2/interpreter/data_generator.hpp>
+#include <boost/assign/v2/interpreter/modifier.hpp>
+#include <boost/assign/v2/interpreter/replace.hpp>
+#include <boost/assign/v2/detail/pp/ignore.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+//[syntax_put_put
+namespace interpreter_aux{
+
+ template<typename C, typename F, typename ModifierTag, typename DataTag>
+ class put_interpreter :
+//<-
+ protected ref::wrapper< ref::assign_tag::copy, C >,
+//->
+ public interpreter_aux::interpreter_crtp<
+ C,
+ F,
+ ModifierTag, DataTag, put_interpreter<C, F, ModifierTag, DataTag>
+ >
+ {
+//<-
+ typedef interpreter_aux::interpreter_crtp<
+ C, F, ModifierTag, DataTag, put_interpreter
+ > super2_t;
+//->
+ public:
+
+ typedef /*<-*/ typename super2_t::result_type
+ BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)/*->*/
+ result_type;
+//<-
+ protected:
+
+ typedef interpreter_aux::interpreter_modifier<ModifierTag> modifier_;
+ typedef ref::assign_tag::copy assign_tag_;
+ typedef ref::wrapper<assign_tag_,C> super1_t;
+//->
+ public:
+
+ put_interpreter()/*<-*/
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit put_interpreter( C& cont )/*<-*/
+ : super1_t( cont )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ explicit put_interpreter( C& cont, F const& f, modifier_ const& m )/*<-*/
+ : super1_t( cont ), super2_t( f, m )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ C& container()const/*<-*/{
+ return static_cast<super1_t const&>(*this).get();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ };
+
+ template<typename C, typename F, typename ModifierTag, typename DataTag>
+ struct replace_data_generator<
+ interpreter_aux::put_interpreter<C, F, ModifierTag, DataTag>
+ >{
+ template<typename F1>
+ struct apply/*<-*/{
+ typedef interpreter_aux::put_interpreter<
+ C, F1, ModifierTag, DataTag
+ > type;
+ }/*->*/;
+ };
+
+ template<typename C, typename F, typename ModifierTag, typename DataTag>
+ struct replace_modifier_tag<
+ interpreter_aux::put_interpreter<C, F, ModifierTag, DataTag>
+ >{
+ template<typename ModifierTag1>
+ struct apply/*<-*/{
+ typedef interpreter_aux::put_interpreter<
+ C, F, ModifierTag1, DataTag
+ > type;
+ }/*->*/;
+ };
+
+ template<typename C, typename F, typename ModifierTag, typename DataTag>
+ struct replace_data_tag<
+ interpreter_aux::put_interpreter<C, F, ModifierTag, DataTag>
+ >{
+ template<typename DataTag1>
+ struct apply/*<-*/{
+ typedef interpreter_aux::put_interpreter<
+ C, F, ModifierTag, DataTag1
+ > type;
+ }/*->*/;
+ };
+
+}// interpreter_aux
+namespace result_of{
+
+ template<
+ typename C/*<-*/
+ , typename DataGenerator
+ = typename interpreter_aux::deduce_data_generator<C>::type
+ >
+ struct put/*<-*/{
+ typedef
+ interpreter_aux::put_interpreter<
+ C
+ , DataGenerator
+ , typename interpreter_aux::deduce_modifier_tag<C>::type
+ , typename interpreter_aux::deduce_data_tag<C>::type
+ >
+ type;
+ }/*->*/;
+
+}// result_of
+
+ template<typename C>
+ typename result_of::put<C>::type
+ put( C& cont )/*<-*/
+ {
+ typedef typename result_of::put<C>::type result_;
+ return result_( cont );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+//]
+
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_PUT_ER_2010_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