Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62493 - in sandbox/SOC/2010/bit_masks: boost/integer/details/bit_mask_group_fusion_ext boost/integer/details/bit_mask_group_fusion_ext/details lib/integer/test
From: bbartmanboost_at_[hidden]
Date: 2010-06-06 16:55:37


Author: bbartman
Date: 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
New Revision: 62493
URL: http://svn.boost.org/trac/boost/changeset/62493

Log:
almost done debugging my fusion extention for bit mask group type
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/bit_mask_group_iterator.hpp | 2 +-
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/at_impl.hpp | 34 ++++++++++++++++++++--------------
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/end_impl.hpp | 38 ++++++++++++++++++++++----------------
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/size_impl.hpp | 22 ++++++++++++++--------
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/value_at_impl.hpp | 28 +++++++++++++++++-----------
   sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/fusion_includes.hpp | 8 ++++----
   sandbox/SOC/2010/bit_masks/lib/integer/test/bit_mask_group_test.cpp | 38 +++++++++++++++++++++-----------------
   7 files changed, 99 insertions(+), 71 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/bit_mask_group_iterator.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/bit_mask_group_iterator.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/bit_mask_group_iterator.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -64,7 +64,7 @@
             index::value + N::value
> type;
 
- static type call(Iterator const& i) {
+ static type call(Iterator const&) {
             return type();
         }
     };

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/at_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/at_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/at_impl.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -6,22 +6,28 @@
 #ifndef BOOST_BIT_MASK_GROUP_FUSION_EXT_AT_IMPL_HPP
 #define BOOST_BIT_MASK_GROUP_FUSION_EXT_AT_IMPL_HPP
 
-namespace boost { namespace fusion { namespace extension {
+namespace boost { namespace fusion {
 
-template <>
-struct at_impl< boost::details::bit_mask_group_tag > {
- template <typename MaskGroup, typename N>
- struct apply {
- typedef typename MaskGroup::
- template get_by_index<
- N::value
- >::type
- type;
- static typename type::value_type call(MaskGroup&) {
- return type::value;
- }
+ struct bit_mask_group_tag;
+
+ namespace extension {
+
+ template <typename> struct at_impl;
+
+ template <>
+ struct at_impl< bit_mask_group_tag > {
+ template <typename MaskGroup, typename N>
+ struct apply {
+ typedef typename MaskGroup::
+ template get_by_index<
+ N::value
+ >::type
+ type;
+ static type call(MaskGroup&) {
+ return type();
+ }
+ };
     };
-};
 
 }}} // end boost::fusion::extension
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/end_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/end_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/end_impl.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -6,24 +6,30 @@
 #ifndef BOOST_BIT_MASK_GROUP_FUSION_EXT_END_IMPL_HPP
 #define BOOST_BIT_MASK_GROUP_FUSION_EXT_END_IMPL_HPP
 
-namespace boost { namespace fusion { namespace extension {
+namespace boost { namespace fusion {
 
-template <>
-struct end_impl< boost::details::bit_mask_group_tag > {
- template <typename MaskGroup>
- struct apply {
- typedef boost::bit_mask_group_iterator<
- MaskGroup,
- mpl::size<
- typename MaskGroup::mask_vector
- >::value
- > type;
-
- static type call(MaskGroup&) {
- return type();
- }
+ struct bit_mask_group_tag;
+
+ namespace extension {
+
+ template <typename> struct end_impl;
+
+ template <>
+ struct end_impl< bit_mask_group_tag > {
+ template <typename MaskGroup>
+ struct apply {
+ typedef bit_mask_group_iterator<
+ MaskGroup,
+ mpl::size<
+ typename MaskGroup::mask_vector
+ >::value
+ > type;
+
+ static type call(MaskGroup&) {
+ return type();
+ }
+ };
     };
-};
 
 }}} // end boost::fusion::extension
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/size_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/size_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/size_impl.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -6,15 +6,21 @@
 #ifndef BOOST_BIT_MASK_GROUP_FUSION_EXT_SIZE_IMPL_HPP
 #define BOOST_BIT_MASK_GROUP_FUSION_EXT_SIZE_IMPL_HPP
 
-namespace boost { namespace fusion { namespace extension {
+namespace boost { namespace fusion {
 
-template<>
-struct size_impl< boost::details::bit_mask_group_tag > {
- template<typename MaskGroup>
- struct apply
- : mpl::size< typename MaskGroup::mask_vector >
- { };
-};
+ struct bit_mask_group_tag;
+
+ namespace extension {
+
+ template <typename> struct size_impl;
+
+ template <>
+ struct size_impl< bit_mask_group_tag > {
+ template<typename MaskGroup>
+ struct apply
+ : mpl::size< typename MaskGroup::mask_vector >
+ { };
+ };
 
 }}} // end boost::fusion::extension
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/value_at_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/value_at_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/details/value_at_impl.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -6,19 +6,25 @@
 #ifndef BOOST_BIT_MASK_GROUP_FUSION_EXT_VALUE_AT_IMPL_HPP
 #define BOOST_BIT_MASK_GROUP_FUSION_EXT_VALUE_AT_IMPL_HPP
 
-namespace boost { namespace fusion { namespace extension {
+namespace boost { namespace fusion {
 
-template <>
-struct value_at_impl< boost::details::bit_mask_group_tag > {
- template <typename MaskGroup, typename N>
- struct apply {
- typedef typename MaskGroup::
- template get_by_index<
- N::value
- >::type
- type;
+ struct bit_mask_group_tag;
+
+ namespace extension {
+
+ template <typename> struct value_at_impl;
+
+ template <>
+ struct value_at_impl< bit_mask_group_tag > {
+ template <typename MaskGroup, typename N>
+ struct apply {
+ typedef typename MaskGroup::
+ template get_by_index<
+ N::value
+ >::type
+ type;
+ };
     };
-};
 
 }}} // end boost::fusion::extension
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/fusion_includes.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/fusion_includes.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bit_mask_group_fusion_ext/fusion_includes.hpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -28,11 +28,11 @@
 // #include "details/category_of_impl.hpp"
 #include "details/is_sequence_impl.hpp"
 #include "details/is_view_impl.hpp"
-// #include "details/end_impl.hpp"
+#include "details/end_impl.hpp"
 #include "details/begin_impl.hpp"
-// #include "details/size_impl.hpp"
-// #include "details/value_at_impl.hpp"
-// #include "details/at_impl.hpp"
+#include "details/size_impl.hpp"
+#include "details/value_at_impl.hpp"
+#include "details/at_impl.hpp"
 
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bit_mask_group_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bit_mask_group_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bit_mask_group_test.cpp 2010-06-06 16:55:35 EDT (Sun, 06 Jun 2010)
@@ -49,12 +49,12 @@
 
     using namespace boost::fusion;
     typedef boost::bit_mask_group<
- // tagged< low_bits_mask< int, 9 >, name_tag >,
- // bits_mask< int, 9 >,
- // bits_mask<int, 8 >,
- // high_bits_mask< int, 3 >,
- integral_mask< int, 0xdeadbeef > //,
- // tagged< integral_mask< unsigned int, 0xdeadbabe >, name_tag_2 >
+ tagged< low_bits_mask< int, 9 >, name_tag >,
+ bits_mask< int, 9 >,
+ bits_mask<int, 8 >,
+ high_bits_mask< int, 3 >,
+ integral_mask< int, 0xdeadbeef >,
+ tagged< integral_mask< unsigned int, 0xdeadbabe >, name_tag_2 >
> bmg_t;
 
     // make sure that this is a sequence and is not a view.
@@ -77,20 +77,24 @@
     bmg_t bmg;
 
     BOOST_ASSERT(( (*begin(bmg)) == bmg.get<0>() ));
- // BOOST_ASSERT(( ));
- // BOOST_ASSERT(( ));
- // BOOST_ASSERT(( ));
+ BOOST_ASSERT(( *next(begin(bmg)) == bmg.get<1>() ));
+ BOOST_ASSERT(( *advance_c<2>(begin(bmg)) == bmg.get<2>() ));
+ BOOST_ASSERT(( prior(next(begin(bmg))) == begin(bmg) ));
+ BOOST_ASSERT(( *prior(end(bmg)) == bmg.get<5>() ));
+ BOOST_ASSERT(( at_c<2>(bmg) == bmg.get<2>() ));
+ BOOST_ASSERT(( size(bmg) == 6));
+ BOOST_ASSERT(( distance(begin(bmg), end(bmg)) == 6 ));
+
 #if 0
 
 
- BOOST_TEST(*begin(arr) == 1);
- BOOST_TEST(*next(begin(arr)) == 2);
- BOOST_TEST(*advance_c<2>(begin(arr)) == 3);
- BOOST_TEST(prior(next(begin(arr))) == begin(arr));
- BOOST_TEST(*prior(end(arr)) == 3);
- BOOST_TEST(at_c<2>(arr) == 3);
- BOOST_TEST(size(arr) == 3);
- BOOST_TEST(distance(begin(arr), end(arr)) == 3);
+ BOOST_TEST();
+ BOOST_TEST();
+ BOOST_TEST();
+ BOOST_TEST();
+ BOOST_TEST();
+ BOOST_TEST();
+ BOOST_TEST();
 
     return boost::report_errors();
 }


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