Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69704 - in sandbox/assign_v2/boost/assign/v2/put/deduce: . modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-08 12:06:32


Author: e_r
Date: 2011-03-08 12:06:31 EST (Tue, 08 Mar 2011)
New Revision: 69704
URL: http://svn.boost.org/trac/boost/changeset/69704

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/
   sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/dependee.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/tag.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp 2011-03-08 12:06:31 EST (Tue, 08 Mar 2011)
@@ -0,0 +1,16 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DEDUCE_MODIFIER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_MODIFIER_ER_2010_HPP
+
+#include <boost/assign/v2/put/modifier/tag.hpp>
+#include <boost/assign/v2/put/modifier/dependee.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/dependee.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/dependee.hpp 2011-03-08 12:06:31 EST (Tue, 08 Mar 2011)
@@ -0,0 +1,18 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DEDUCE_MODIFIER_DEPENDEE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_MODIFIER_DEPENDEE_ER_2010_HPP
+
+#include <boost/assign/v2/put/modifier/insert.hpp>
+#include <boost/assign/v2/put/modifier/iterate.hpp>
+#include <boost/assign/v2/put/modifier/push.hpp>
+#include <boost/assign/v2/put/modifier/push_back.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/tag.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/modifier/tag.hpp 2011-03-08 12:06:31 EST (Tue, 08 Mar 2011)
@@ -0,0 +1,79 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DEDUCE_MODIFIER_TAG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_MODIFIER_TAG_ER_2010_HPP
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/assign/v2/detail/traits/switch.hpp>
+#include <boost/assign/v2/detail/traits/container/is_array.hpp>
+#include <boost/assign/v2/detail/traits/container/has_push.hpp>
+#include <boost/assign/v2/detail/traits/container/is_associative.hpp>
+
+#include <boost/assign/v2/put/modifier/insert/tag.hpp>
+#include <boost/assign/v2/put/modifier/iterate/tag.hpp>
+#include <boost/assign/v2/put/modifier/push/tag.hpp>
+#include <boost/assign/v2/put/modifier/push_back/tag.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace switch_tag{
+ struct deduce_put{};
+}// switch_tag
+namespace switch_aux{
+
+ template<>
+ struct case_<switch_tag::deduce_put, 0> :
+ switch_aux::helper<
+ v2::modifier_tag::insert,
+ v2::container_traits::is_associative
+ >{};
+
+ template<>
+ struct case_<switch_tag::deduce_put, 1> :
+ switch_aux::helper<
+ v2::modifier_tag::iterate<>,
+ v2::container_traits::is_array
+ >{};
+
+ template<>
+ struct case_<switch_tag::deduce_put, 2> :
+ switch_aux::helper<
+ v2::modifier_tag::push,
+ container_traits::has_push_deduced_value
+ >{};
+
+ template<>
+ struct case_<switch_tag::deduce_put, 3> :
+ switch_aux::helper<v2::modifier_tag::push_back>{};
+
+}// switch_aux
+namespace put_aux{
+
+ template<typename T>
+ struct deduce_modifier_tag
+ : switch_aux::result< switch_tag::deduce_put, T>
+ {};
+
+ // For testing purposes
+ template<typename C, typename X>
+ void check_deduce()
+ {
+ typedef typename put_aux::deduce_modifier_tag<C>::type found_;
+ BOOST_MPL_ASSERT(( boost::is_same<found_, X> ));
+ }
+
+}// put_aux
+}// v2
+}// assign
+}// boost
+
+#endif


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