Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69930 - in sandbox/assign_v2/boost/assign/v2/put/modifier: . lookup
From: erwann.rogard_at_[hidden]
Date: 2011-03-13 10:06:02


Author: e_r
Date: 2011-03-13 10:05:59 EDT (Sun, 13 Mar 2011)
New Revision: 69930
URL: http://svn.boost.org/trac/boost/changeset/69930

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp | 59 ++++++++++++++++++++++++++++++++++-
   sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/impl.hpp | 66 ---------------------------------------
   sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/tag.hpp | 26 ---------------
   3 files changed, 59 insertions(+), 92 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/lookup.hpp 2011-03-13 10:05:59 EDT (Sun, 13 Mar 2011)
@@ -9,8 +9,63 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_ER_2010_HPP
-#include <boost/assign/v2/put/modifier/lookup/impl.hpp>
-#include <boost/assign/v2/put/modifier/lookup/tag.hpp>
+#include <boost/assign/v2/detail/keyword/ignore.hpp>
+#include <boost/assign/v2/put/adapter/modifier.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/shared_ptr.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace modifier_tag{
+
+ template<typename Arg> struct lookup;
+
+}// modifier_tag
+namespace put_aux{
+
+ template<typename Arg>
+ class adapter_modifier<modifier_tag::lookup<Arg> >
+ {
+
+ typedef Arg arg_;
+ // storing a copy of lambda::something has caused pbs, hence ptr
+ typedef boost::shared_ptr<arg_> ptr_;
+ typedef keyword_aux::ignore ignore_;
+
+ public:
+
+ adapter_modifier() : ptr( new arg_() ){}
+ explicit adapter_modifier(
+ ignore_,
+ typename boost::call_traits<arg_>::param_type arg
+ ) : ptr( new arg_( arg ) )
+ {}
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+ template<typename C, typename T>
+ void impl(C& cont, T&& t )const
+ {
+ cont[ key ] = (*this->ptr)( cont[ std::forward<T>( key ) ] );
+ }
+
+#else
+
+ template<typename C, typename T>
+ void impl(C& cont, T& key )const{
+ cont[ key ] = (*this->ptr)( cont[ key ] );
+ }
+
+#endif
+
+ private:
+ ptr_ ptr;
+ };
+
+}// put_aux
+}// v2
+}// assign
+}// boost
 
 #include <boost/assign/v2/put/modifier/modulo.hpp>
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_KEYWORD(lookup)

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/impl.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/impl.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/impl.hpp 2011-03-13 10:05:59 EDT (Sun, 13 Mar 2011)
@@ -1,65 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_MODIFIER_LOOKUP_IMPL_ER_2010_HPP
-#define BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_IMPL_ER_2010_HPP
-#include <boost/assign/v2/detail/keyword/ignore.hpp>
-#include <boost/assign/v2/put/adapter/modifier.hpp>
-#include <boost/assign/v2/put/modifier/lookup/tag.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/shared_ptr.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{namespace put_aux{
-
- template<typename Arg>
- class adapter_modifier<modifier_tag::lookup<Arg> >
- {
-
- typedef Arg arg_;
- // storing a copy of lambda::something has caused pbs, hence ptr
- typedef boost::shared_ptr<arg_> ptr_;
- typedef keyword_aux::ignore ignore_;
-
- public:
-
- adapter_modifier() : ptr( new arg_() ){}
- explicit adapter_modifier(
- ignore_,
- typename boost::call_traits<arg_>::param_type arg
- ) : ptr( new arg_( arg ) )
- {}
-
-#if BOOST_ASSIGN_V2_ENABLE_CPP0X
- template<typename C, typename T>
- void impl(C& cont, T&& t )const
- {
- cont[ key ] = (*this->ptr)( cont[ std::forward<T>( key ) ] );
- }
-
-#else
-
- template<typename C, typename T>
- void impl(C& cont, T& key )const{
- cont[ key ] = (*this->ptr)( cont[ key ] );
- }
-
-#endif
-
- private:
- ptr_ ptr;
- };
-
-}// put_aux
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_IMPL_ER_2010_HPP
+// TODO remove file
\ No newline at end of file

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/tag.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/tag.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/lookup/tag.hpp 2011-03-13 10:05:59 EDT (Sun, 13 Mar 2011)
@@ -1,25 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_MODIFIER_LOOKUP_TAG_ER_2010_HPP
-#define BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_TAG_ER_2010_HPP
-
-namespace boost{
-namespace assign{
-namespace v2{
-namespace modifier_tag{
-
- template<typename Arg> struct lookup;
-
-}// modifier_tag
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_PUT_MODIFIER_LOOKUP_TAG_ER_2010_HPP
+// TODO remove file
\ 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