|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63052 - in sandbox/SOC/2010/bit_masks: boost/integer/details/bft/ext boost/integer/details/bft/ext/fusion boost/integer/details/bit_mask_group_fusion_ext/details lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-17 14:22:14
Author: bbartman
Date: 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
New Revision: 63052
URL: http://svn.boost.org/trac/boost/changeset/63052
Log:
completed fusion extension begin
Text files modified:
sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_iterator.hpp | 6 +++---
sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp | 2 +-
sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/begin_impl.hpp | 28 ++++++++++++++++++++++++++++
sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/begin_impl.hpp | 2 +-
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp | 8 ++++++--
5 files changed, 39 insertions(+), 7 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_iterator.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_iterator.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_iterator.hpp 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
@@ -18,12 +18,12 @@
namespace boost {
namespace details {
-struct category
+struct bft_category
: boost::fusion::random_access_traversal_tag,
boost::fusion::associative_tag
{ };
-typedef mpl::void_ IMPLEMENT_ME;
+
} // end detials
/** Fusion Iterator for bitfield_tuple class.
@@ -33,7 +33,7 @@
struct bitfield_tuple_iterator
: fusion::iterator_facade<
bitfield_tuple_iterator<BitfieldTuple, Pos>,
- details::category
+ details::bft_category
>
{
/** Constructor over a bitfield tuple. */
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
@@ -16,12 +16,12 @@
#include "fusion/is_view_impl.hpp"
#include "fusion/category_of_impl.hpp"
#include "fusion/at_impl.hpp"
+#include "fusion/begin_impl.hpp"
#include "fusion/end_impl.hpp"
#include "fusion/size_impl.hpp"
#include "fusion/at_key_impl.hpp"
#include "fusion/has_key_impl.hpp"
#include "fusion/value_at_impl.hpp"
-#include "fusion/begin_impl.hpp"
#include "fusion/value_at_key_impl.hpp"
#endif
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/begin_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/begin_impl.hpp 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
@@ -2,3 +2,31 @@
// 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_BITFIELD_TUPLE_FUSION_EXT_BEGIN_HPP
+#define BOOST_BITFIELD_TUPLE_FUSION_EXT_BEGIN_HPP
+
+namespace boost {
+
+struct bitfield_tuple_tag;
+
+namespace fusion { namespace extension {
+
+template <typename>
+struct begin_impl;
+
+template<>
+struct begin_impl< bitfield_tuple_tag > {
+ template<typename BitfieldTuple>
+ struct apply {
+ typedef bitfield_tuple_iterator<BitfieldTuple,0> type;
+ static type call(BitfieldTuple& bft) {
+ return type( bft);
+ }
+ };
+};
+
+}}} // end boost::fusion::extension
+
+#endif
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/begin_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/begin_impl.hpp 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
@@ -22,7 +22,7 @@
typedef bit_mask_group_iterator<MaskGroup, 0> type;
static type call(MaskGroup&) {
- return type();
+ return type();
}
};
};
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp 2010-06-17 14:22:12 EDT (Thu, 17 Jun 2010)
@@ -53,8 +53,6 @@
// category_of testing
{
- // using fusion;
- // using extension;
BOOST_MPL_ASSERT((
is_same<
fusion::traits::category_of<
@@ -65,6 +63,12 @@
));
}
+ // begin testing
+ {
+ test_tuple temp;
+ temp.get<red>() = 4;
+ BOOST_ASSERT(( fusion::deref(fusion::begin(temp)) == 4));
+ }
/*
bmg_t bmg;
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