Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63054 - in sandbox/SOC/2010/bit_masks: boost/integer/details/bft/ext/fusion lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-17 14:33:52


Author: bbartman
Date: 2010-06-17 14:33:52 EDT (Thu, 17 Jun 2010)
New Revision: 63054
URL: http://svn.boost.org/trac/boost/changeset/63054

Log:
completed fusion extension end
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/end_impl.hpp | 36 ++++++++++++++++++++++++++++++++++++
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp | 7 +++++++
   2 files changed, 43 insertions(+), 0 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/end_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/end_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/end_impl.hpp 2010-06-17 14:33:52 EDT (Thu, 17 Jun 2010)
@@ -2,3 +2,39 @@
 // 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_BITFELD_TUPLE_FUSION_EXT_END_HPP
+#define BOOST_BITFELD_TUPLE_FUSION_EXT_END_HPP
+#include <boost/mpl/size.hpp>
+
+
+namespace boost {
+
+struct bitfield_tuple_tag;
+
+namespace fusion { namespace extension {
+
+
+template <typename> struct end_impl;
+
+template <>
+struct end_impl< bitfield_tuple_tag > {
+
+ template <typename BitfieldTuple>
+ struct apply {
+ typedef bitfield_tuple_iterator<
+ BitfieldTuple,
+ mpl::size<
+ typename BitfieldTuple::members
+ >::value
+ > type;
+
+ // non-const at function.
+ static type call(BitfieldTuple& bft) {
+ return type( bft );
+ }
+ };
+};
+
+}}} // end boost::fusion::extension
+#endif

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:33:52 EDT (Thu, 17 Jun 2010)
@@ -75,6 +75,13 @@
         test_tuple temp;
         BOOST_ASSERT(( fusion::size(temp) == 3 ));
     }
+
+ // end testing
+ {
+ test_tuple temp;
+ temp.get<salmon>() = 3;
+ BOOST_ASSERT(( fusion::deref(fusion::prior(fusion::end(temp))) == 3 ));
+ }
     /*
     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