|
Boost-Commit : |
From: danmarsden_at_[hidden]
Date: 2007-10-27 18:18:14
Author: danmarsden
Date: 2007-10-27 18:18:13 EDT (Sat, 27 Oct 2007)
New Revision: 40516
URL: http://svn.boost.org/trac/boost/changeset/40516
Log:
fixing missing traversal category on binary transform view, by reusing zip_view algorithm
Added:
trunk/boost/fusion/view/detail/
trunk/boost/fusion/view/detail/strictest_traversal.hpp
- copied unchanged from r40493, /trunk/boost/fusion/view/zip_view/detail/strictest_traversal.hpp
Removed:
trunk/boost/fusion/view/zip_view/detail/strictest_traversal.hpp
Text files modified:
trunk/boost/fusion/view/transform_view/transform_view.hpp | 4 ++++
trunk/boost/fusion/view/zip_view/zip_view.hpp | 2 +-
trunk/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
Modified: trunk/boost/fusion/view/transform_view/transform_view.hpp
==============================================================================
--- trunk/boost/fusion/view/transform_view/transform_view.hpp (original)
+++ trunk/boost/fusion/view/transform_view/transform_view.hpp 2007-10-27 18:18:13 EDT (Sat, 27 Oct 2007)
@@ -17,6 +17,8 @@
#include <boost/fusion/view/transform_view/detail/end_impl.hpp>
#include <boost/fusion/view/transform_view/detail/at_impl.hpp>
#include <boost/fusion/view/transform_view/detail/value_at_impl.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
@@ -42,6 +44,8 @@
typedef typename traits::category_of<Sequence1>::type category1;
typedef typename traits::category_of<Sequence2>::type category2;
+ typedef typename detail::strictest_traversal<
+ fusion::vector2<Sequence1, Sequence2> >::type category;
typedef typename result_of::begin<Sequence1>::type first1_type;
typedef typename result_of::begin<Sequence2>::type first2_type;
typedef typename result_of::end<Sequence1>::type last1_type;
Deleted: trunk/boost/fusion/view/zip_view/detail/strictest_traversal.hpp
==============================================================================
--- trunk/boost/fusion/view/zip_view/detail/strictest_traversal.hpp 2007-10-27 18:18:13 EDT (Sat, 27 Oct 2007)
+++ (empty file)
@@ -1,68 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2006 Joel de Guzman
- Copyright (c) 2006 Dan Marsden
-
- 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)
-==============================================================================*/
-#if !defined(FUSION_STRICTEST_TRAVERSAL_20060123_2101)
-#define FUSION_STRICTEST_TRAVERSAL_20060123_2101
-
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/fusion/support/category_of.hpp>
-#include <boost/fusion/mpl.hpp>
-#include <boost/fusion/algorithm/iteration/fold.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-namespace boost { namespace fusion
-{
- struct forward_traversal_tag;
- struct bidirectional_traversal_tag;
- struct random_access_traversal_tag;
-
- namespace detail
- {
- template<typename Tag1, typename Tag2,
- bool Tag1Stricter = boost::is_convertible<Tag2,Tag1>::value>
- struct stricter_traversal
- {
- typedef Tag1 type;
- };
-
- template<typename Tag1, typename Tag2>
- struct stricter_traversal<Tag1,Tag2,false>
- {
- typedef Tag2 type;
- };
-
- struct strictest_traversal_impl
- {
- template<typename Sig>
- struct result;
-
- template<typename Next, typename StrictestSoFar>
- struct result<strictest_traversal_impl(Next, StrictestSoFar)>
- {
- typedef typename remove_reference<Next>::type next_value;
- typedef typename remove_reference<StrictestSoFar>::type strictest_so_far;
-
- typedef strictest_so_far tag1;
- typedef typename traits::category_of<next_value>::type tag2;
-
- typedef typename stricter_traversal<tag1,tag2>::type type;
- };
- };
-
- template<typename Sequence>
- struct strictest_traversal
- : result_of::fold<
- Sequence, fusion::random_access_traversal_tag,
- strictest_traversal_impl>
- {};
-
- }
-}}
-
-#endif
Modified: trunk/boost/fusion/view/zip_view/zip_view.hpp
==============================================================================
--- trunk/boost/fusion/view/zip_view/zip_view.hpp (original)
+++ trunk/boost/fusion/view/zip_view/zip_view.hpp 2007-10-27 18:18:13 EDT (Sat, 27 Oct 2007)
@@ -11,7 +11,7 @@
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/unused.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
-#include <boost/fusion/view/zip_view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
#include <boost/fusion/view/zip_view/detail/begin_impl.hpp>
#include <boost/fusion/view/zip_view/detail/end_impl.hpp>
#include <boost/fusion/view/zip_view/detail/size_impl.hpp>
Modified: trunk/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp
==============================================================================
--- trunk/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp (original)
+++ trunk/boost/fusion/view/zip_view/zip_view_iterator_fwd.hpp 2007-10-27 18:18:13 EDT (Sat, 27 Oct 2007)
@@ -8,7 +8,7 @@
#if !defined(FUSION_ZIP_VIEW_ITERATOR_FWD)
#define FUSION_ZIP_VIEW_ITERATOR_FWD
-#include <boost/fusion/view/zip_view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
namespace boost { namespace fusion {
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