|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55819 - sandbox/statistics/binary_op/boost/binary_op/meta
From: erwann.rogard_at_[hidden]
Date: 2009-08-27 20:44:01
Author: e_r
Date: 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
New Revision: 55819
URL: http://svn.boost.org/trac/boost/changeset/55819
Log:
binary_op changes
Added:
sandbox/statistics/binary_op/boost/binary_op/meta/is_tuple.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_const.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_ref.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_const.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_ref.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_cv.hpp (contents, props changed)
sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_ref.hpp (contents, props changed)
Added: sandbox/statistics/binary_op/boost/binary_op/meta/is_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/is_tuple.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::is_tuple.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_IS_TUPLE_HPP_ER_2009
+#define BOOST_BINARY_OP_META_IS_TUPLE_HPP_ER_2009
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<typename T>
+ struct is_tuple : mpl::bool_<false>{};
+
+ template<typename Head,typename Tail>
+ struct is_tuple< tuple<Head,Tail > > : mpl::bool_<true>{};
+
+}
+}
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_const.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_const.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::tuple_element_is_const.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_IS_TUPLE_ELEMENT_IS_CONST_HPP_ER_2009
+#define BOOST_BINARY_OP_META_IS_TUPLE_ELEMENT_IS_CONST_HPP_ER_2009
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<unsigned i,typename T>
+ struct tuple_element_is_const
+ : is_const<typename tuples::element<i,T>::type>{};
+
+}
+}
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_ref.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_element_is_ref.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::tuple_element_is_ref.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_IS_TUPLE_ELEMENT_IS_REF_HPP_ER_2009
+#define BOOST_BINARY_OP_META_IS_TUPLE_ELEMENT_IS_REF_HPP_ER_2009
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<unsigned i,typename T>
+ struct tuple_element_is_ref
+ : is_reference<typename tuples::element<i,T>::type>{};
+
+}
+}
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_const.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_const.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::tuple_has_no_const.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_IS_TUPLE_HAS_NO_CONST_HPP_ER_2009
+#define BOOST_BINARY_OP_META_IS_TUPLE_HAS_NO_CONST_HPP_ER_2009
+#include <boost/binary_op/meta/detail/tuple_has_no.hpp>
+#include <boost/binary_op/meta/tuple_element_is_const.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<typename T>
+ struct tuple_has_no_const
+ : detail::tuple_has_no<T,tuple_element_is_const>{};
+
+}
+}
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_ref.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_has_no_ref.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::tuple_has_no_ref.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_IS_TUPLE_HAS_NO_REF_HPP_ER_2009
+#define BOOST_BINARY_OP_META_IS_TUPLE_HAS_NO_REF_HPP_ER_2009
+#include <boost/binary_op/meta/detail/tuple_has_no.hpp>
+#include <boost/binary_op/meta/tuple_element_is_ref.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<typename T>
+ struct tuple_has_no_ref
+ : detail::tuple_has_no<T,tuple_element_is_ref>{};
+
+}
+}
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_cv.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_cv.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::remove_cv.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_REMOVE_CV_HPP_ER_2009
+#define BOOST_BINARY_OP_META_REMOVE_CV_HPP_ER_2009
+#include <boost/type_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<typename T>
+ struct tuple_remove_cv{
+
+ typedef typename tuples::element<0,T>::type first_;
+ typedef typename tuples::element<1,T>::type second_;
+
+ typedef tuple<
+ typename remove_cv<first_>::type,
+ typename remove_cv<second_>::type
+ > type;
+
+ };
+
+}// binary_op
+}// boost
+
+#endif
\ No newline at end of file
Added: sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_ref.hpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/binary_op/boost/binary_op/meta/tuple_remove_ref.hpp 2009-08-27 20:43:58 EDT (Thu, 27 Aug 2009)
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+// binary_op::meta::remove_ref.hpp //
+// //
+// Copyright 2009 Erwann Rogard. Distributed under 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_BINARY_OP_META_REMOVE_REF_HPP_ER_2009
+#define BOOST_BINARY_OP_META_REMOVE_REF_HPP_ER_2009
+#include <boost/type_traits.hpp>
+#include <boost/tuple/tuple.hpp>
+
+namespace boost{
+namespace binary_op{
+
+ template<typename T>
+ struct tuple_remove_ref{
+
+ typedef typename tuples::element<0,T>::type first_;
+ typedef typename tuples::element<1,T>::type second_;
+
+ typedef tuple<
+ typename remove_reference<first_>::type,
+ typename remove_reference<second_>::type
+ > type;
+
+ };
+
+}// binary_op
+}// boost
+
+#endif
\ No newline at end of file
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