|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70351 - in sandbox/assign_v2: boost/assign/v2/framework boost/assign/v2/optional boost/assign/v2/optional/standard libs/assign/v2/test/optional
From: erwann.rogard_at_[hidden]
Date: 2011-03-21 16:10:31
Author: e_r
Date: 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
New Revision: 70351
URL: http://svn.boost.org/trac/boost/changeset/70351
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/boost/assign/v2/framework/as_arg_list.hpp | 2
sandbox/assign_v2/boost/assign/v2/framework/fun.hpp | 2
sandbox/assign_v2/boost/assign/v2/framework/modifier.hpp | 52 +++++++++++++++++++--------------------
sandbox/assign_v2/boost/assign/v2/optional/fun.hpp | 34 +++++++++++++-------------
sandbox/assign_v2/boost/assign/v2/optional/modifier.hpp | 24 +++++++++---------
sandbox/assign_v2/boost/assign/v2/optional/standard/modifier.hpp | 2
sandbox/assign_v2/libs/assign/v2/test/optional/iterate.cpp | 8 +++---
sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp | 8 +++---
sandbox/assign_v2/libs/assign/v2/test/optional/standard.cpp | 4 +-
9 files changed, 67 insertions(+), 69 deletions(-)
Modified: sandbox/assign_v2/boost/assign/v2/framework/as_arg_list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/framework/as_arg_list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/framework/as_arg_list.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -42,7 +42,7 @@
};
-//[syntax_put_adapter_as_arg_list
+//[syntax_framework_as_arg_list
namespace result_of{
template<typename R>
Modified: sandbox/assign_v2/boost/assign/v2/framework/fun.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/framework/fun.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/framework/fun.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -21,7 +21,7 @@
namespace boost{
namespace assign{
namespace v2{
-//[syntax_put_fun_deduce
+//[syntax_framework_fun
namespace aux{
template<typename C>
Modified: sandbox/assign_v2/boost/assign/v2/framework/modifier.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/framework/modifier.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/framework/modifier.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -26,13 +26,16 @@
namespace boost{
namespace assign{
namespace v2{
-//[syntax_put_adapter_modifier
+//[syntax_framework_modifier
namespace /*<< Template arguments to `aux::adapter_modifier<>` have to be declared within this `namespace`>>*/modifier_tag{}
namespace aux{
template<typename Tag>
struct /*<<Specialize on Tag>>*/ adapter_modifier{};
+ template<typename C>
+ struct /*<<Meta-function returning a modifier-tag>>*/deduce_modifier_tag;
+
}// aux
namespace put_concept{
@@ -57,10 +60,10 @@
struct deduce_put{};
}// switch_tag
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_CASE
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_CASE
#error
#else
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_CASE(Tag, MetaF, Number)\
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_CASE(Tag, MetaF, Number)\
namespace switch_aux{\
template<>\
struct case_<switch_tag::deduce_put, Number> :\
@@ -73,34 +76,34 @@
#endif
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ASSOCIATIVE
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ASSOCIATIVE
#error
#else
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ASSOCIATIVE(CaseNumber)\
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_CASE(insert, value_container_aux::is_sorted, CaseNumber)\
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ASSOCIATIVE(CaseNumber)\
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_CASE(insert, value_container_aux::is_sorted, CaseNumber)\
/**/
#endif
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ARRAY
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ARRAY
#error
#else
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ARRAY(CaseNumber)\
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_CASE(iterate<>, value_container_aux::is_array, CaseNumber)
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ARRAY(CaseNumber)\
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_CASE(iterate<>, value_container_aux::is_array, CaseNumber)
/**/
#endif
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ADAPTER
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ADAPTER
#error
#else
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ADAPTER(CaseNumber)\
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_CASE(push, value_container_aux::has_push_deduced_value, CaseNumber)
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ADAPTER(CaseNumber)\
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_CASE(push, value_container_aux::has_push_deduced_value, CaseNumber)
/**/
#endif
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_DEFAULT
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_DEFAULT
#error
#else
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_DEFAULT(CaseNumber)\
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_DEFAULT(CaseNumber)\
namespace switch_aux{\
template<>\
struct case_<switch_tag::deduce_put, CaseNumber> :\
@@ -111,28 +114,23 @@
#endif
//[example_put_modifier_deduce_switch
-#ifdef BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH
+#ifdef BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH
#warning
#else
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ASSOCIATIVE(0)
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ARRAY(1)
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_ADAPTER(2)
-BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH_DEFAULT(3)
-#define BOOST_ASSIGN_V2_OPTIONAL_DEDUCE_SWITCH
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ASSOCIATIVE(0)
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ARRAY(1)
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_ADAPTER(2)
+BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH_DEFAULT(3)
+#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_SWITCH
//]
#endif
-//[syntax_put_modifier_deduce
namespace aux{
template<typename C>
- struct /*<<Meta-function returning a modifier-tag>>*/deduce_modifier_tag/*<-*/
+ struct deduce_modifier_tag
: switch_aux::result< switch_tag::deduce_put, C>
- {}/*->*/;
-
-}// aux
-//]
-namespace aux{
+ {};
// For testing purposes
template<typename C, typename X>
Modified: sandbox/assign_v2/boost/assign/v2/optional/fun.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/optional/fun.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/optional/fun.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -22,7 +22,7 @@
namespace result_of{
template<typename D>
- struct modulo_fun{
+ struct optional_fun{
typedef aux::replace_fun<D> meta_;
@@ -34,10 +34,10 @@
}// result_of
template<typename F = keyword_aux::ignore>
- struct modulo_fun
+ struct optional_fun
{
- modulo_fun(){}
- modulo_fun(F f) : f_( f ){}
+ optional_fun(){}
+ optional_fun(F f) : f_( f ){}
F const& fun()const{ return this->f_; }
@@ -46,13 +46,13 @@
};
template<typename C, typename F, typename Tag, typename D, typename F1>
- typename ::boost::mpl::apply1<result_of::modulo_fun<D>, F1>::type
+ typename ::boost::mpl::apply1<result_of::optional_fun<D>, F1>::type
operator%(
adapter_crtp<C, F, Tag, D> const& lhs,
- modulo_fun<F1> const& rhs
+ optional_fun<F1> const& rhs
)
{
- typedef result_of::modulo_fun<D> meta_;
+ typedef result_of::optional_fun<D> meta_;
typedef typename ::boost::mpl::apply1<meta_, F1>::type result_;
return result_( lhs.container(), rhs.fun(), lhs.modifier );
}
@@ -60,8 +60,8 @@
struct keyword_fun{
template<typename F>
- modulo_fun<F> operator=(F const& f)const{
- return modulo_fun<F>( f );
+ optional_fun<F> operator=(F const& f)const{
+ return optional_fun<F>( f );
}
};
@@ -74,8 +74,8 @@
namespace result_of{
template<typename D>
- struct modulo_fun/*<-*/
- : aux::result_of::modulo_fun<D>
+ struct optional_fun/*<-*/
+ : aux::result_of::optional_fun<D>
{}/*->*/;
}// result_of
@@ -88,14 +88,14 @@
#include <boost/preprocessor/cat.hpp>
-#define BOOST_ASSIGN_V2_MODULO_FUN_GENERATE(NAME, FUN)\
+#define BOOST_ASSIGN_V2_OPTIONAL_FUN_GENERATE(NAME, FUN)\
namespace boost{\
namespace assign{\
namespace v2{\
namespace aux{\
\
template<typename T>\
- modulo_fun< FUN > NAME()\
+ optional_fun< FUN > NAME()\
{\
return ( v2::_fun = FUN() );\
}\
@@ -108,14 +108,14 @@
/**/
#include <boost/assign/v2/detail/functor/constructor.hpp>
-BOOST_ASSIGN_V2_MODULO_FUN_GENERATE(constructor, v2::functor_aux::constructor<T>)
+BOOST_ASSIGN_V2_OPTIONAL_FUN_GENERATE(constructor, v2::functor_aux::constructor<T>)
#include <boost/assign/v2/detail/functor/new.hpp>
-BOOST_ASSIGN_V2_MODULO_FUN_GENERATE(new_ptr, v2::functor_aux::new_<T>)
+BOOST_ASSIGN_V2_OPTIONAL_FUN_GENERATE(new_ptr, v2::functor_aux::new_<T>)
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/add_const.hpp>
-#define BOOST_ASSIGN_V2_MODULO_FUN_KEYWORD(NAME, EXPR)\
+#define BOOST_ASSIGN_V2_OPTIONAL_FUN_KEYWORD(NAME, EXPR)\
namespace boost{\
namespace assign{\
namespace v2{\
@@ -129,6 +129,6 @@
}\
#include <boost/lambda/lambda.hpp>
-BOOST_ASSIGN_V2_MODULO_FUN_KEYWORD(identity, ::boost::lambda::_1)
+BOOST_ASSIGN_V2_OPTIONAL_FUN_KEYWORD(identity, ::boost::lambda::_1)
#endif // BOOST_ASSIGN_V2_OPTIONAL_FUN_ER_2010_HPP
Modified: sandbox/assign_v2/boost/assign/v2/optional/modifier.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/optional/modifier.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/optional/modifier.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -24,11 +24,11 @@
namespace aux{
template<typename /*<<A class of modifiers>>*/ Keyword, typename /*<<A part of the modifier's implementation>>*/Arg = keyword_aux::ignore>
- struct modulo_modifier
+ struct optional_modifier
{
- modulo_modifier(){}
- modulo_modifier(Arg arg)/*<-*/
+ optional_modifier(){}
+ optional_modifier(Arg arg)/*<-*/
:arg_( arg )
{}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
@@ -38,9 +38,9 @@
}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
template<typename Arg1>
- modulo_modifier<Keyword, Arg1>
+ optional_modifier<Keyword, Arg1>
operator=(const Arg1& arg1)const/*<-*/{
- return modulo_modifier<Keyword, Arg1>( arg1 );
+ return optional_modifier<Keyword, Arg1>( arg1 );
}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
//<-
@@ -59,7 +59,7 @@
namespace result_of{
template<typename D>
- struct modulo_modifier{
+ struct optional_modifier{
//<-
typedef aux::replace_modifier_tag<D> meta_;
@@ -85,12 +85,12 @@
template<typename C, typename F, typename Tag, typename D,
typename Keyword, typename Arg>
typename ::boost::mpl::apply2<
- result_of::modulo_modifier<D>,
+ result_of::optional_modifier<D>,
Keyword, Arg
>::type
operator%(
adapter_crtp<C, F, Tag, D> const& lhs,
- modulo_modifier<Keyword, Arg> const& rhs
+ optional_modifier<Keyword, Arg> const& rhs
)/*<-*/
{
typedef aux::meta_modifier_tag<Keyword, Arg> meta_;
@@ -98,7 +98,7 @@
typedef aux::adapter_modifier<modifier_tag> modifier_;
typedef typename ::boost::mpl::apply2<
- result_of::modulo_modifier<D>,
+ result_of::optional_modifier<D>,
Keyword, Arg
>::type result_;
@@ -114,8 +114,8 @@
namespace result_of{
template<typename D>
- struct modulo_modifier
- : aux::result_of::modulo_modifier<D>
+ struct optional_modifier
+ : aux::result_of::optional_modifier<D>
{};
}// result_of
@@ -150,7 +150,7 @@
#error
#else
#define BOOST_ASSIGN_V2_OPTIONAL_MODIFIER_PARAM(NAME)\
- aux::modulo_modifier<aux::BOOST_PP_CAT(keyword_,NAME)>\
+ aux::optional_modifier<aux::BOOST_PP_CAT(keyword_,NAME)>\
/**/
#endif
Modified: sandbox/assign_v2/boost/assign/v2/optional/standard/modifier.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/optional/standard/modifier.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/optional/standard/modifier.hpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -84,7 +84,7 @@
}\
namespace{\
\
- aux::modulo_modifier<aux::keyword_standard_modifier, modifier_tag::FUN> const\
+ aux::optional_modifier<aux::keyword_standard_modifier, modifier_tag::FUN> const\
BOOST_PP_CAT(_,FUN) = ( \
_standard_modifier = modifier_tag::FUN() \
);\
Modified: sandbox/assign_v2/libs/assign/v2/test/optional/iterate.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/optional/iterate.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/optional/iterate.cpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -38,10 +38,10 @@
//[test_optional_iterate_meta
typedef as2::aux::keyword_iterate keyword_;
typedef as2::modifier_tag::iterate_arg arg_;
- typedef as2::aux::modulo_modifier<keyword_, arg_> modulo_;
+ typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
typedef array<int, 4> cont_;
typedef as2::result_of::put<cont_>::type put_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
typedef as2::modifier_tag::iterate<arg_> tag1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
@@ -62,9 +62,9 @@
//[test_optional_iterate_meta_deque
typedef as2::aux::keyword_iterate keyword_;
typedef as2::modifier_tag::iterate_arg arg_;
- typedef as2::aux::modulo_modifier<keyword_, arg_> modulo_;
+ typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
typedef as2::result_of::deque<int>::type put_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
typedef as2::modifier_tag::iterate<arg_> tag1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
Modified: sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/optional/lookup.cpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -38,10 +38,10 @@
using namespace lambda;
typedef BOOST_TYPEOF(_1) arg_;
typedef as2::aux::keyword_lookup keyword_;
- typedef as2::aux::modulo_modifier<keyword_, arg_> modulo_;
+ typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
typedef std::map<std::string, int> cont_;
typedef as2::result_of::put<cont_>::type put_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
typedef as2::modifier_tag::lookup<arg_> tag1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
@@ -67,9 +67,9 @@
using namespace lambda;
typedef BOOST_TYPEOF(_1) arg_;
typedef as2::aux::keyword_lookup keyword_;
- typedef as2::aux::modulo_modifier<keyword_, arg_> modulo_;
+ typedef as2::aux::optional_modifier<keyword_, arg_> modulo_;
typedef as2::result_of::deque<int>::type put_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, arg_>::type result1_;
typedef as2::modifier_tag::lookup<arg_> tag1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
Modified: sandbox/assign_v2/libs/assign/v2/test/optional/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/optional/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/optional/standard.cpp 2011-03-21 16:10:30 EDT (Mon, 21 Mar 2011)
@@ -50,7 +50,7 @@
typedef as2::result_of::put<std::vector<int> >::type put_;
typedef as2::aux::keyword_standard_modifier keyword_;
typedef as2::modifier_tag::push_front tag_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, tag_>::type result1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
typedef ::boost::mpl::apply1<meta2_, tag_>::type result2_;
@@ -98,7 +98,7 @@
typedef as2::result_of::deque<int>::type put_;
typedef as2::aux::keyword_standard_modifier keyword_;
typedef as2::modifier_tag::push_front tag_;
- typedef as2::result_of::modulo_modifier<put_> meta1_;
+ typedef as2::result_of::optional_modifier<put_> meta1_;
typedef ::boost::mpl::apply2<meta1_, keyword_, tag_>::type result1_;
typedef as2::aux::replace_modifier_tag<put_> meta2_;
typedef ::boost::mpl::apply1<meta2_, tag_>::type result2_;
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