Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68508 - in sandbox/assign_v2/boost/assign/v2/put: . deduce
From: erwann.rogard_at_[hidden]
Date: 2011-01-27 18:44:10


Author: e_r
Date: 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
New Revision: 68508
URL: http://svn.boost.org/trac/boost/changeset/68508

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/put/deduce/
   sandbox/assign_v2/boost/assign/v2/put/deduce/dependee.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/fwd.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/modulo.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/deduce/traits.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/ext.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/put/std.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/dependee.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/dependee.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 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_DEPENDEE_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_DEPENDEE_ER_2010_HPP
+
+#include <boost/assign/v2/put/std/insert.hpp>
+#include <boost/assign/v2/put/std/push.hpp>
+#include <boost/assign/v2/put/std/push_back.hpp>
+#include <boost/assign/v2/put/ext/iterate.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/fwd.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_FWD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_FWD_ER_2010_HPP
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace modifier_tag{
+ /*ext*/
+ struct iterate;
+ /*std*/
+ struct insert;
+ struct push;
+ struct push_back;
+}// modifier_tag
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/modifier.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,76 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/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/deduce/fwd.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

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/modulo.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/modulo.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,49 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_MODULO_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_MODULO_ER_2010_HPP
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/assign/v2/put/deduce/modifier.hpp>
+
+namespace boost{
+ struct use_default;
+namespace assign{
+namespace v2{
+namespace put_aux{
+
+ struct kwd_deduce{};
+
+ template<typename T>
+ typename T::result_of_modulo::deduce::type
+ operator%(T const& t, kwd_deduce const& kwd)
+ {
+ return t.modulo_deduce();
+ }
+
+ template<typename Option1, typename Option2>
+ struct deduce : ::boost::mpl::eval_if<
+ boost::is_same<Option1, boost::use_default>,
+ boost::mpl::identity<Option2>,
+ boost::mpl::identity<Option1>
+ >{};
+
+}// put_aux
+namespace{
+ const put_aux::kwd_deduce _deduce = put_aux::kwd_deduce();
+}
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/deduce/traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/deduce/traits.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,38 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TRAITS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_DEDUCE_TRAITS_ER_2010_HPP
+#include <boost/assign/v2/detail/traits/container/value.hpp>
+#include <boost/assign/v2/detail/traits/container/is_ptr_container.hpp>
+#include <boost/assign/v2/detail/functor/constructor.hpp>
+#include <boost/assign/v2/detail/functor/new.hpp>
+#include <boost/assign/v2/put/deduce/modifier.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+
+ template<typename C>
+ struct put_traits
+ {
+ typedef typename v2::container_traits::value<C>::type value_type;
+ typedef typename ::boost::mpl::eval_if<
+ v2::container_traits::is_ptr_container<C>,
+ functor_aux::deduce_new_<C>,
+ functor_aux::deduce_constructor<C>
+ >::type functor_type;
+ typedef typename put_aux::deduce_modifier_tag<C>::type modifier_tag;
+ };
+
+}// v2
+}// assign
+}// boost
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/ext.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/ext.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,17 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_EXT_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_EXT_ER_2010_HPP
+
+#include <boost/assign/v2/put/ext/iterate.hpp>
+#include <boost/assign/v2/put/ext/lookup.hpp>
+#include <boost/assign/v2/put/ext/repeat.hpp>
+
+#endif

Added: sandbox/assign_v2/boost/assign/v2/put/std.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/put/std.hpp 2011-01-27 18:44:09 EST (Thu, 27 Jan 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_STD_ER_2010_HPP
+#define BOOST_ASSIGN_V2_PUT_STD_ER_2010_HPP
+
+#include <boost/assign/v2/put/std/insert.hpp>
+#include <boost/assign/v2/put/std/push.hpp>
+#include <boost/assign/v2/put/std/push_back.hpp>
+#include <boost/assign/v2/put/std/push_front.hpp>
+
+#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