|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71042 - in sandbox/assign_v2/boost/assign/v2: . put
From: erwann.rogard_at_[hidden]
Date: 2011-04-06 15:01:45
Author: e_r
Date: 2011-04-06 15:01:44 EDT (Wed, 06 Apr 2011)
New Revision: 71042
URL: http://svn.boost.org/trac/boost/changeset/71042
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/boost/assign/v2/put.hpp | 1
sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp | 126 +++++++++++++++------------------------
2 files changed, 50 insertions(+), 77 deletions(-)
Modified: sandbox/assign_v2/boost/assign/v2/put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put.hpp 2011-04-06 15:01:44 EDT (Wed, 06 Apr 2011)
@@ -9,6 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_ASSIGN_V2_PUT_ER_2010_HPP
#define BOOST_ASSIGN_V2_PUT_ER_2010_HPP
+//#include <boost/assign/v2/put/delay_csv_put.hpp> TODO
#include <boost/assign/v2/put/csv_put.hpp>
#include <boost/assign/v2/put/put.hpp>
Modified: sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp 2011-04-06 15:01:44 EDT (Wed, 06 Apr 2011)
@@ -10,6 +10,7 @@
#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/detail/pp/ignore.hpp>
#include <boost/assign/v2/interpreter/csv.hpp>
#include <boost/assign/v2/put/put.hpp>
#include <boost/assign/v2/option/data.hpp>
@@ -19,11 +20,7 @@
#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/control.hpp>
-#include <boost/preprocessor/repetition.hpp>
-#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+#endif
namespace boost{
namespace assign{
@@ -32,40 +29,45 @@
namespace interpreter_aux{
template<typename F>
- struct csv_ready
+ struct csv_ready/*<-*/
: ::boost::mpl::true_
- {};
+ {}/*->*/;
template<typename T, typename K, typename M>
struct csv_ready<
functor_aux::pair<T, K, M>
- >
+ > /*<-*/
: ::boost::mpl::false_
- {};
+ {}/*->*/;
namespace result_of{
template<typename C, typename F, typename MTag, typename DTag>
- struct if_csv_ready : ::boost::mpl::identity<
- put_interpreter<C, F, MTag, DTag>
- >
- {};
-
- template<typename C, typename F, typename MTag, typename DTag>
- struct else_csv_ready : result_of::option_data<
- put_interpreter<C, F, MTag, DTag>, C, value_
- >
- {};
-
- template<typename C, typename F, typename MTag, typename DTag>
- struct make_csv_ready : ::boost::mpl::eval_if<
- csv_ready<F>,
- if_csv_ready<C, F, MTag, DTag>,
- else_csv_ready<C, F, MTag, DTag>
- >{};
+ struct if_csv_ready/*<-*/
+ : ::boost::mpl::identity<
+ put_interpreter<C, F, MTag, DTag>
+ >
+ {}/*->*/;
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ struct else_csv_ready/*<-*/
+ : result_of::option_data<
+ put_interpreter<C, F, MTag, DTag>, C, value_
+ >
+ {}/*->*/;
+
+ template<typename C, typename F, typename MTag, typename DTag>
+ struct make_csv_ready/*<-*/
+ : ::boost::mpl::eval_if<
+ csv_ready<F>,
+ if_csv_ready<C, F, MTag, DTag>,
+ else_csv_ready<C, F, MTag, DTag>
+ >
+ {}/*->*/;
}// result_of
+/*<-*/
template<typename C, typename F, typename MTag, typename DTag>
typename result_of::if_csv_ready<C, F, MTag, DTag>::type
make_csv_ready(
@@ -85,26 +87,26 @@
{
return interpreter % ( _data = _value );
}
-
+/*->*/
template<typename C, typename F, typename MTag, typename DTag>
typename result_of::make_csv_ready<C, F, MTag, DTag>::type
make_csv_ready( put_interpreter<C, F, MTag, DTag> const& interpreter)
- {
+ /*->*/{
return make_csv_ready(
interpreter,
typename csv_ready<F>::type()
);
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
//<-
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
//->
-
template<typename C, typename O, bool is, typename Args>
typename boost::enable_if<
is_option_crtp<O>
>::type csv_put( C& cont, option_crtp<O, is> const& crtp, Args&&... args )
+ /*<-*/
{
O const& options = static_cast<O const&>( crtp );
csv(
@@ -113,69 +115,39 @@
),
std::forward<Args>( args )...
);
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
template<typename C, typename Args>
typename boost::disable_if<
is_option_crtp<O>
- >::type csv_put( C& cont, Args&&... args)
+ >::type csv_put( C& cont, Args&&... args)/*<-*/
{
csv(
make_csv_ready( put( cont ) ),
std::forward<Args>( args )...
);
- }
-
-//]
-#else
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- template<typename C>
- void csv_put( C& cont ){}
-
-#define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
- template<typename C, typename O, BOOST_PP_ENUM_PARAMS(N, typename T)>\
- typename boost::enable_if<\
- is_option_crtp<O>\
- >::type csv_put(\
- C& cont, O const& options,\
- BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
- )\
- {\
- csv(\
- make_csv_ready( put( cont ) % options ) \
- , BOOST_PP_ENUM_PARAMS(N, _)\
- );\
- }\
- template<typename C, BOOST_PP_ENUM_PARAMS(N, typename T)>\
- typename boost::disable_if<\
- is_option_crtp<T0>\
- >::type csv_put(\
- C& cont,\
- BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
- )\
- {\
- csv( make_csv_ready( put( cont ) ), BOOST_PP_ENUM_PARAMS(N, _) );\
- }\
-/**/
-BOOST_PP_REPEAT_FROM_TO(
- 1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
- 0
-)
-BOOST_PP_REPEAT_FROM_TO(
- 1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
- 1
-)
-#undef BOOST_ASSIGN_V2_MACRO
+//<-
#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
}// interpreter_aux
+//<-
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
using interpreter_aux::csv_put;
+//<-
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
+//]
+
}// v2
}// assign
}// boost
+#if !BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <boost/assign/v2/put/cpp03/csv_put.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
#endif // BOOST_ASSIGN_V2_PUT_CSV_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