Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63229 - in sandbox/SOC/2010/bit_masks/boost/integer: . details/bft/ext details/bft/ext/fusion
From: bbartmanboost_at_[hidden]
Date: 2010-06-22 09:57:52


Author: bbartman
Date: 2010-06-22 09:57:48 EDT (Tue, 22 Jun 2010)
New Revision: 63229
URL: http://svn.boost.org/trac/boost/changeset/63229

Log:
having trouble getting my code to compile because of an expected primary-sxpression from inside a static function inside of at_impl
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp | 33 ++++++++++++++++++++++++++-------
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/bitfield_iterator.hpp | 8 ++++----
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/at_impl.hpp | 2 +-
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/begin_impl.hpp | 2 +-
   4 files changed, 32 insertions(+), 13 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp 2010-06-22 09:57:48 EDT (Tue, 22 Jun 2010)
@@ -17,8 +17,7 @@
 #include <boost/mpl/less.hpp>
 #include <boost/mpl/size.hpp>
 #include <string>
-#include <boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp>
-#include <boost/integer/details/fusion_ext_includes.hpp>
+
 
 namespace boost {
 
@@ -456,6 +455,16 @@
         const_bit_ref();
     };
 
+ /** Fusion Friends.
+ * These are templates which are friended by bitfield_tuple.
+ */
+ //@{
+ // friend struct ::boost::fusion::extension::at_impl<bitfield_tuple_tag>;
+ // friend struct ::boost::fusion::extension::begin_impl<bitfield_tuple_tag>;
+ // friend struct ::boost::fusion::extension::end_impl<bitfield_tuple_tag>;
+ // template<typename T,std::size_t N>
+ // friend struct ::boost::bitfield_tuple_iterator;
+ //@}
 
     /** Value constructor.
      * This sets the initial value of the internal data to x.
@@ -500,18 +509,27 @@
         _data = x._data;
     }
 
+
+ private:
+ storage_type const& get_storage() const {
+ return _data;
+ }
+
+ storage_type& get_storage() {
+ return _data;
+ }
+ public:
+
     /** Internal storage accessors
      * Returns a reference of the internally stored type. This provides the
      * ability for the fusion sequence extension to work correctly.
- * TODO Remove this at a later time if I can figure out how to make get
- * callable from within the fusion functions.
      */
     //@{
- storage_type const& data( ) const {
+ storage_type const data( ) const {
          return _data;
     }
 
- storage_type& data( ) {
+ storage_type data( ) {
          return _data;
     }
     //@}
@@ -691,6 +709,7 @@
 
 } // end boost
 
-
+#include <boost/integer/details/bft/ext/bitfield_tuple_fusion_includes.hpp>
+#include <boost/integer/details/fusion_ext_includes.hpp>
 
 #endif

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-22 09:57:48 EDT (Tue, 22 Jun 2010)
@@ -70,12 +70,12 @@
 
         // const dereference operation.
         static type call(Iter const& iter) {
- return type( iter._data.data() );
+ return type( iter._data.get_storage() );
         }
 
         // non-const dereference operation.
         static type call(Iter& iter) {
- return type( iter._data.data() );
+ return type( iter._data.get_storage() );
         }
     };
 
@@ -154,12 +154,12 @@
 
         // const dereference operation.
         static type call(Iter const& iter) {
- return type( iter._data.data() );
+ return type( iter._data.get_storage() );
         }
 
         // non-const dereference operation.
         static type call(Iter& iter) {
- return type( iter._data.data() );
+ return type( iter._data.get_storage() );
         }
     };
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/at_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/at_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/ext/fusion/at_impl.hpp 2010-06-22 09:57:48 EDT (Tue, 22 Jun 2010)
@@ -30,7 +30,7 @@
> type;
         // non-const at function.
         static type call(BitfieldTuple& bft) {
- return type( bft.data() );
+ return bft.get<N>();
         }
     };
 };

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-22 09:57:48 EDT (Tue, 22 Jun 2010)
@@ -22,7 +22,7 @@
     struct apply {
         typedef bitfield_tuple_iterator<BitfieldTuple,0> type;
         static type call(BitfieldTuple& bft) {
- return type( bft);
+ return type(bft);
         }
     };
 };


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