Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72361 - sandbox/assign_v2/boost/assign/v2/support/traits/type
From: erwann.rogard_at_[hidden]
Date: 2011-06-02 20:46:33


Author: e_r
Date: 2011-06-02 20:46:33 EDT (Thu, 02 Jun 2011)
New Revision: 72361
URL: http://svn.boost.org/trac/boost/changeset/72361

Log:
upd assign_v2
Added:
   sandbox/assign_v2/boost/assign/v2/support/traits/type/add_ref_const.hpp (contents, props changed)
   sandbox/assign_v2/boost/assign/v2/support/traits/type/param.hpp (contents, props changed)

Added: sandbox/assign_v2/boost/assign/v2/support/traits/type/add_ref_const.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/support/traits/type/add_ref_const.hpp 2011-06-02 20:46:33 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,32 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_SUPPORT_TYPE_TRAITS_ADD_REF_CONST_ER_2011_HPP
+#define BOOST_ASSIGN_V2_SUPPORT_TYPE_TRAITS_ADD_REF_CONST_ER_2011_HPP
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace type_traits{
+
+ template<typename T>
+ struct add_ref_const
+ : boost::add_reference<
+ typename boost::add_const<T>::type
+ >
+ {};
+
+}// type_traits
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_SUPPORT_TYPE_TRAITS_ADD_REF_CONST_ER_2011_HPP

Added: sandbox/assign_v2/boost/assign/v2/support/traits/type/param.hpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/boost/assign/v2/support/traits/type/param.hpp 2011-06-02 20:46:33 EDT (Thu, 02 Jun 2011)
@@ -0,0 +1,52 @@
+//////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2011 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_SUPPORT_TYPE_TRAITS_PARAM_ER_2011_HPP
+#define BOOST_ASSIGN_V2_SUPPORT_TYPE_TRAITS_PARAM_ER_2011_HPP
+#include <boost/assign/v2/support/config/enable_cpp0x.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost{
+namespace assign{
+namespace v2{
+namespace type_traits{
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ template<typename T>
+ struct param
+ : boost::add_const<T>
+ {
+ // rvalue
+ };
+
+ // lvalue:
+
+ template<typename T>
+ struct param<T&>
+ {
+ typedef T type;
+ };
+
+#else
+
+ template<typename T>
+ struct param
+ {
+ typedef T type;
+ };
+
+#endif
+
+}// type_traits
+}// v2
+}// assign
+}// boost
+
+#endif // BOOST_ASSIGN_V2_SUPPORT_TYPE_TRAITS_PARAM_ER_2011_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