Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69794 - sandbox/assign_v2/boost/assign/v2/put/container
From: erwann.rogard_at_[hidden]
Date: 2011-03-09 16:19:05


Author: e_r
Date: 2011-03-09 16:19:03 EST (Wed, 09 Mar 2011)
New Revision: 69794
URL: http://svn.boost.org/trac/boost/changeset/69794

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/put/container/put_range.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/put/container/put_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/container/put_range.hpp 2011-03-09 16:19:03 EST (Wed, 09 Mar 2011)
@@ -0,0 +1,51 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_RANGE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_CONTAINER_PUT_RANGE_ER_2010_HPP
+#include <boost/assign/v2/put/container/put.hpp>
+#include <boost/range/algorithm/for_each.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace result_of{
+
+ template<typename /*<<C& has to be a reference>>*/C, typename R, bool binary = true>
+ struct put_range
+ {
+ typedef C& type;
+ };
+
+ template<typename C, typename R>
+ struct put_range<C, R>
+ {
+ typedef C type;
+ };
+
+}// result_of
+
+ template<typename C, typename R>
+ C& put_range( C& cont, R const& r )
+ {
+ return ::boost::for_each( r, put( cont ) ).container();
+ }
+
+ template<typename C, typename R>
+ C put_range( R const& r )
+ {
+ C cont;
+ return put_range( cont, r );
+ }
+
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_PUT_CONTAINER_PUT_RANGE_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