Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63437 - in sandbox/SOC/2010/bit_masks: boost/integer/details/bft lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-29 11:26:54


Author: bbartman
Date: 2010-06-29 11:26:53 EDT (Tue, 29 Jun 2010)
New Revision: 63437
URL: http://svn.boost.org/trac/boost/changeset/63437

Log:
refactored my original implementation of make_bitfield_tuple into a free function rather then a struct
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/details/bft/make_bitfield_tuple.hpp | 22 ++++++++++------------
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp | 2 +-
   2 files changed, 11 insertions(+), 13 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/make_bitfield_tuple.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/make_bitfield_tuple.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/make_bitfield_tuple.hpp 2010-06-29 11:26:53 EDT (Tue, 29 Jun 2010)
@@ -114,19 +114,17 @@
  * This will need a macro in order to create the appearance of variadic
  * behavior, although some of that will be taken care of by default values.
  */
+/** the reason the name of the macro is so large is because the number of
+ * parameters this function could possibly hold is as many as fifty.
+ */
 template <typename BitfieldTuple>
-struct make_bitfield_tuple {
- /** the reason the name of the macro is so large is because the number of
- * parameters this function could possibly hold is as many as fifty.
- */
- static BitfieldTuple create(
- BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARAMETERS()
- ) {
- BitfieldTuple bft;
- BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARSE_ARGUMENTS();
- return bft;
- }
-};
+BitfieldTuple make_bitfield_tuple(
+ BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARAMETERS())
+{
+ BitfieldTuple bft;
+ BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARSE_ARGUMENTS();
+ return bft;
+}
 
 } // end boost
 

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp 2010-06-29 11:26:53 EDT (Tue, 29 Jun 2010)
@@ -44,7 +44,7 @@
     }
     {
        
- test_tuple bft = make_bitfield_tuple<test_tuple>::create(1,2,4,true);
+ test_tuple bft = make_bitfield_tuple<test_tuple>(1,2,4,true);
         BOOST_ASSERT(( bft.get<red>() == 1 ));
         BOOST_ASSERT(( bft.get<green>() == 2 ));
         BOOST_ASSERT(( bft.get<salmon>() == 4 ));


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