Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56277 - in sandbox/SOC/2009/fusion/boost/fusion: . adapted adapted/detail/boost_tuple include
From: mr.chr.schmidt_at_[hidden]
Date: 2009-09-17 14:49:08


Author: cschmidt
Date: 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
New Revision: 56277
URL: http://svn.boost.org/trac/boost/changeset/56277

Log:
adapted std::(tr1::)tuple
Added:
   sandbox/SOC/2009/fusion/boost/fusion/adapted/std_tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/std_tuple.hpp (contents, props changed)
Removed:
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/
Text files modified:
   sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp | 4 ++--
   sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp | 1 +
   sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp | 33 ++++++++++++++++++++-------------
   sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp | 40 +++++++++++++++++++++-------------------
   4 files changed, 44 insertions(+), 34 deletions(-)

Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -13,9 +13,9 @@
 #include <boost/fusion/adapted/boost_array.hpp>
 #include <boost/fusion/adapted/boost_tuple.hpp>
 #include <boost/fusion/adapted/mpl.hpp>
-//TODO!!!
-//#include <boost/fusion/adapted/std_array.hpp>
+#include <boost/fusion/adapted/std_array.hpp>
 #include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/adapted/std_tuple.hpp>
 #include <boost/fusion/adapted/struct.hpp>
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -9,5 +9,6 @@
 #define BOOST_FUSION_ADAPTED_ARRAY_HPP
 
 #include <boost/fusion/adapted/boost_array.hpp>
+#include <boost/fusion/adapted/std_array.hpp>
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -1,5 +1,6 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2009 Christopher Schmidt
 
     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)
@@ -8,22 +9,28 @@
 #ifndef BOOST_FUSION_ADAPTED_BOOST_TUPLE_HPP
 #define BOOST_FUSION_ADAPTED_BOOST_TUPLE_HPP
 
-//TODO adapt std::(tr1::)tuple upper limit!!!
-
 #include <boost/fusion/support/internal/ref.hpp>
 
 #include <boost/tuple/tuple.hpp>
 
-#include <boost/fusion/adapted/detail/boost_tuple/tag_of.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/is_view_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/category_of_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/size_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/at_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/value_at_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/begin_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/end_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/deref_impl.hpp>
-#include <boost/fusion/adapted/detail/boost_tuple/value_of_impl.hpp>
+#define BOOST_FUSION_ADAPTED_TUPLE_NAMESPACE(X) tuples::X
+#define BOOST_FUSION_ADAPTED_TUPLE_TAG boost_tuple_tag
+#define BOOST_FUSION_ADAPTED_TUPLE_ITERATOR_TAG boost_tuple_iterator_tag
+
+#include <boost/fusion/adapted/detail/tuple/tag_of.hpp>
+#include <boost/fusion/adapted/detail/tuple/at_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/deref_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/end_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/size_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/tuple/value_of_impl.hpp>
+
+#undef BOOST_FUSION_ADAPTED_TUPLE_ITERATOR_TAG
+#undef BOOST_FUSION_ADAPTED_TUPLE_TAG
+#undef BOOST_FUSION_ADAPTED_TUPLE_NAMESPACE
 
 #endif

Modified: sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp
==============================================================================
--- sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp (original)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -7,27 +7,29 @@
 
 #ifndef BOOST_FUSION_ADAPTED_STD_ARRAY_HPP
 #define BOOST_FUSION_ADAPTED_STD_ARRAY_HPP
-
+
 #include <boost/config.hpp>
-#include <boost/fusion/support/internal/ref.hpp>
+#if !defined(BOOST_NO_0X_HDR_ARRAY) || defined(BOOST_HAS_TR1_ARRAY)
+# include <boost/fusion/support/internal/ref.hpp>
 
-#define BOOST_FUSION_ADAPTED_ARRAY_TYPE struct
-#ifdef BOOST_HAS_TR1_ARRAY
-# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std::tr1
-#else
-# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std
-#endif
-#include <boost/fusion/adapted/detail/array/tag_of.hpp>
-#undef BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE
-#undef BOOST_FUSION_ADAPTED_ARRAY_TYPE
+# define BOOST_FUSION_ADAPTED_ARRAY_TYPE struct
+# ifndef BOOST_NO_0X_HDR_ARRAY
+# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std
+# else
+# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std::tr1
+# endif
+# include <boost/fusion/adapted/detail/array/tag_of.hpp>
+# undef BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE
+# undef BOOST_FUSION_ADAPTED_ARRAY_TYPE
 
-#include <boost/fusion/adapted/detail/array/is_view_impl.hpp>
-#include <boost/fusion/adapted/detail/array/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/detail/array/category_of_impl.hpp>
-#include <boost/fusion/adapted/detail/array/begin_impl.hpp>
-#include <boost/fusion/adapted/detail/array/end_impl.hpp>
-#include <boost/fusion/adapted/detail/array/size_impl.hpp>
-#include <boost/fusion/adapted/detail/array/at_impl.hpp>
-#include <boost/fusion/adapted/detail/array/value_at_impl.hpp>
+# include <boost/fusion/adapted/detail/array/is_view_impl.hpp>
+# include <boost/fusion/adapted/detail/array/is_sequence_impl.hpp>
+# include <boost/fusion/adapted/detail/array/category_of_impl.hpp>
+# include <boost/fusion/adapted/detail/array/begin_impl.hpp>
+# include <boost/fusion/adapted/detail/array/end_impl.hpp>
+# include <boost/fusion/adapted/detail/array/size_impl.hpp>
+# include <boost/fusion/adapted/detail/array/at_impl.hpp>
+# include <boost/fusion/adapted/detail/array/value_at_impl.hpp>
+#endif
 
 #endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/std_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/std_tuple.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2009 Christopher Schmidt
+
+ 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_FUSION_ADAPTED_STD_TUPLE_HPP
+#define BOOST_FUSION_ADAPTED_STD_TUPLE_HPP
+
+#include <boost/config.hpp>
+#if !defined(BOOST_NO_0X_HDR_TUPLE) || defined(BOOST_HAS_TR1_TUPLE)
+# include <boost/fusion/support/internal/ref.hpp>
+
+# include <boost/preprocessor/cat.hpp>
+
+# ifdef BOOST_NO_0X_HDR_TUPLE
+# include <tr1/tuple>
+
+# define BOOST_FUSION_ADAPTED_TUPLE_NAMESPACE(X)\
+ BOOST_PP_CAT(std::tr1::tuple_,X)
+# else
+# include <tuple>
+
+# define BOOST_FUSION_ADAPTED_TUPLE_NAMESPACE(X)\
+ BOOST_PP_CAT(std::tuple_,X)
+# endif
+# define BOOST_FUSION_ADAPTED_STD_TUPLE
+# define BOOST_FUSION_ADAPTED_TUPLE_TAG std_tuple_tag
+# define BOOST_FUSION_ADAPTED_TUPLE_ITERATOR_TAG std_tuple_iterator_tag
+
+# include <boost/fusion/adapted/detail/tuple/tag_of.hpp>
+# include <boost/fusion/adapted/detail/tuple/at_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/begin_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/category_of_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/deref_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/end_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/is_sequence_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/is_view_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/size_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/value_at_impl.hpp>
+# include <boost/fusion/adapted/detail/tuple/value_of_impl.hpp>
+
+# undef BOOST_FUSION_ADAPTED_TUPLE_ITERATOR_TAG
+# undef BOOST_FUSION_ADAPTED_TUPLE_TAG
+# undef BOOST_FUSION_ADAPTED_STD_TUPLE
+# undef BOOST_FUSION_ADAPTED_TUPLE_NAMESPACE
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/std_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/std_tuple.hpp 2009-09-17 14:49:07 EDT (Thu, 17 Sep 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2009 Christopher Schmidt
+
+ 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_FUSION_INCLUDE_STD_TUPLE_HPP
+#define BOOST_FUSION_INCLUDE_STD_TUPLE_HPP
+
+#include <boost/fusion/adapted/std_tuple.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