$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r69790 - sandbox/assign_v2/boost/assign/v2/put/container
From: erwann.rogard_at_[hidden]
Date: 2011-03-09 16:13:22
Author: e_r
Date: 2011-03-09 16:13:20 EST (Wed, 09 Mar 2011)
New Revision: 69790
URL: http://svn.boost.org/trac/boost/changeset/69790
Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/put/container/adapter.hpp   (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/fwd.hpp   (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/container/put.hpp   (contents, props changed)
Added: sandbox/assign_v2/boost/assign/v2/put/container/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/adapter.hpp	2011-03-09 16:13:20 EST (Wed, 09 Mar 2011)
@@ -0,0 +1,75 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONTAINER_ADAPTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_ADAPTER_ER_2010_HPP
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <boost/assign/v2/put/container/fwd.hpp> // consistency
+#include <boost/assign/v2/put/frame/crtp.hpp>
+#include <boost/assign/v2/put/frame/modifier.hpp>
+#include <boost/assign/v2/put/frame/replace_parameter.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_aux{
+
+    template<typename C, typename F, typename Tag>
+    class container_adapter
+        : protected ref::wrapper< ref::assign_tag::copy, C >
+        , public put_aux::crtp< C, F, Tag, container_adapter<C, F, Tag> >
+    {
+        typedef put_aux::crtp< C, F, Tag, container_adapter > super2_t;
+
+        public:
+
+        typedef typename super2_t::result_type result_type;
+
+        protected:
+
+        typedef put_aux::modifier<Tag> modifier_;
+        typedef ref::assign_tag::copy assign_tag_;
+        typedef ref::wrapper<assign_tag_,C> super1_t;
+
+        public:
+
+        container_adapter(){}
+        explicit container_adapter( C& cont ) : super1_t( cont ) {}
+        explicit container_adapter( C& cont, F const& f, modifier_ const& m )
+            : super1_t( cont ), super2_t( f, m )
+            {
+                // This constructor is required in conjunction with modulo
+            }
+
+        C& container()const{
+            return static_cast<super1_t const&>(*this).get();
+        }
+
+    };
+
+    template<typename C, typename F, typename Tag>
+    struct replace_fun< put_aux::container_adapter<C, F, Tag> >
+    {
+        template<typename F1>
+        struct apply{ typedef put_aux::container_adapter<C, F1, Tag> type; };
+    };
+
+    template<typename C, typename F, typename Tag>
+    struct replace_modifier_tag< put_aux::container_adapter<C, F, Tag> >
+    {
+        template<typename Tag1>
+        struct apply{ typedef put_aux::container_adapter<C, F, Tag1> type; };
+    };
+
+}// put_aux
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CONTAINER_ADAPTER_ER_2010_HPP
Added: sandbox/assign_v2/boost/assign/v2/put/container/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/fwd.hpp	2011-03-09 16:13:20 EST (Wed, 09 Mar 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONTAINER_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace put_aux{
+
+    template<typename C, typename F, typename Tag> class container_adapter;
+
+}// put_aux
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CONTAINER_FWD_ER_2010_HPP
Added: sandbox/assign_v2/boost/assign/v2/put/container/put.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/put.hpp	2011-03-09 16:13:20 EST (Wed, 09 Mar 2011)
@@ -0,0 +1,45 @@
+//////////////////////////////////////////////////////////////////////////////
+//  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_CONTAINER_PUT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_PUT_ER_2010_HPP
+#include <boost/assign/v2/put/container/fwd.hpp>
+#include <boost/assign/v2/put/container/adapter.hpp>
+#include <boost/assign/v2/put/deduce/fun.hpp>
+#include <boost/assign/v2/put/deduce/modifier/tag.hpp>
+#include <boost/assign/v2/put/deduce/modifier/dependee.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace result_of{
+
+    template<typename C>
+    struct put
+    {
+        typedef typename put_aux::deduce_fun<C>::type f_;
+        typedef typename put_aux::deduce_modifier_tag<C>::type modifier_tag_;
+        typedef put_aux::container_adapter<C, f_, modifier_tag_> 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 );
+    }
+
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CONTAINER_FUNCTOR_RESULT_OF_ER_2010_HPP