Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70595 - sandbox/assign_v2/boost/assign/v2/option/modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-26 16:48:11


Author: e_r
Date: 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
New Revision: 70595
URL: http://svn.boost.org/trac/boost/changeset/70595

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp | 6 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp | 6 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp | 6 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp | 6 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp | 115 ++++++++++++++++++++++++++++++++++++++-
   5 files changed, 122 insertions(+), 17 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_OPTION_MODIFIER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_FRAMEWORK_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_FRAMEWORK_ER_2010_HPP
 #include <boost/assign/v2/detail/keyword/ignore.hpp>
 #include <boost/assign/v2/detail/pp/ignore.hpp>
 #include <boost/assign/v2/interpreter/fwd.hpp>
@@ -175,4 +175,4 @@
 }// assign
 }// boost
 
-#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_FRAMEWORK_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_OPTION_ITERATE_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_ITERATE_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_ITERATE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_ITERATE_ER_2010_HPP
 #include <cstddef>
 #include <boost/assign/v2/detail/keyword/ignore.hpp>
 #include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
@@ -109,4 +109,4 @@
 }// boost
 
 
-#endif // BOOST_ASSIGN_V2_OPTION_ITERATE_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_ITERATE_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_OPTION_MAPPED_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_MAPPED_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_MAPPED_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_MAPPED_ER_2010_HPP
 #include <boost/assign/v2/detail/keyword/ignore.hpp>
 #include <boost/assign/v2/detail/pp/ignore.hpp>
 #include <boost/assign/v2/interpreter/fwd.hpp>
@@ -77,4 +77,4 @@
 }// boost
 
 
-#endif // BOOST_ASSIGN_V2_OPTION_MAPPED_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_MAPPED_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_OPTION_REPEAT_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_REPEAT_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_REPEAT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_REPEAT_ER_2010_HPP
 #include <cstddef>
 #include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
 #include <boost/assign/v2/detail/pp/ignore.hpp>
@@ -88,4 +88,4 @@
 }// assign
 }// boost
 
-#endif // BOOST_ASSIGN_V2_OPTION_REPEAT_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_REPEAT_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp 2011-03-26 16:48:10 EDT (Sat, 26 Mar 2011)
@@ -7,9 +7,114 @@
 // 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_OPTION_STD_MODIFIER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_ER_2010_HPP
-#include <boost/assign/v2/option/std/modifier/framework.hpp>
-#include <boost/assign/v2/option/modifier/std/include.hpp>
+#ifndef BOOST_ASSIGN_V2_OPTION_MODIFIER_STD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_STD_ER_2010_HPP
+#include <boost/assign/v2/detail/keyword/ignore.hpp>
+#include <boost/assign/v2/interpreter/fwd.hpp>
+#include <boost/assign/v2/option/modifier/framework.hpp>
+#include <boost/preprocessor/cat.hpp>
 
-#endif // BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_ER_2010_HPP
+namespace boost{
+namespace assign{
+namespace v2{
+
+BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(std_modifier)
+BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(std_modifier, Arg)
+
+}// v2
+}// assign
+}// boost
+
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_PTR(FUN)\
+ template<typename C, typename T>\
+ void impl(C& cont, T* t)const{\
+ cont.FUN( t );\
+}\
+/**/
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_LVALUE(FUN)\
+ template<typename C, typename T>\
+ void impl(C& cont, T& t)const{\
+ cont.FUN( t );\
+}\
+/**/
+
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <utility>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_reference.hpp>
+// disable_if necessary to avoid ambiguity resolution with GCC4.4
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_RVALUE(FUN)\
+ template<typename C, typename T>\
+ typename boost::disable_if<\
+ boost::is_reference<T>,\
+ void\
+ >::type\
+ impl(C& cont, T&& t)const{\
+ cont.FUN( std::move( t ) );\
+ }\
+/**/
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL(FUN)\
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_LVALUE(FUN)\
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_RVALUE(FUN)\
+/**/
+#else
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL(FUN)\
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL_LVALUE(FUN)\
+/**/
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(FUN)\
+namespace boost{\
+namespace assign{\
+namespace v2{\
+namespace modifier_tag{ struct FUN{}; }\
+}\
+}\
+}\
+/**/
+
+// Must be preceded by BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(FUN)
+#define BOOST_ASSIGN_V2_OPTION_STD_MODIFIER(FUN)\
+namespace boost{\
+namespace assign{\
+namespace v2{\
+namespace interpreter_aux{\
+\
+ template<>\
+ class interpreter_modifier<modifier_tag::FUN>\
+ {\
+ typedef keyword_aux::ignore ignore_;\
+ public:\
+ interpreter_modifier(){}\
+ interpreter_modifier( ignore_, ignore_ ){}\
+ BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL(FUN)\
+ };\
+\
+}\
+namespace{\
+\
+ interpreter_aux::option_modifier<interpreter_aux::keyword_std_modifier, modifier_tag::FUN> const\
+ BOOST_PP_CAT(_,FUN) = ( \
+ _std_modifier = modifier_tag::FUN() \
+ );\
+\
+}\
+}\
+}\
+}\
+/**/
+
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(insert)
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER(insert)
+
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(push)
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER(push)
+
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(push_back)
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER(push_back)
+
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_TAG(push_front)
+BOOST_ASSIGN_V2_OPTION_STD_MODIFIER(push_front)
+
+#endif // BOOST_ASSIGN_V2_OPTION_MODIFIER_STD_ER_2010_HPP
\ No newline at end of file


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