Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64265 - in sandbox/SOC/2010/bit_masks: . boost/integer boost/integer/detail/bft boost/integer/detail/bft/ext lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-22 12:22:35


Author: bbartman
Date: 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
New Revision: 64265
URL: http://svn.boost.org/trac/boost/changeset/64265

Log:
reviewed all files which are part of the bitfield tuple implementation and added to the notes section which things can be changed and which things can and should be renamed moved etc..
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bft_element.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bitfield_tuple_impl.hpp | 8 -
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/tag_of.hpp | 18 +-
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/make_bitfield_tuple.hpp | 235 +++++++----------------------------
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/proxy_reference_policy.hpp | 6
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/reference_builder.hpp | 4
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/align_test.cpp | 3
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/filler_test.cpp | 4
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp | 3
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_member_test.cpp | 1
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_parsing_meta_function_test.cpp | 12 +
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp | 5
   sandbox/SOC/2010/bit_masks/notes.txt | 266 ++++++++++++++++++++++++++++++++++++++++
   14 files changed, 343 insertions(+), 226 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-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -31,8 +31,6 @@
 #include <boost/integer/detail/bft/make_bitfield_tuple.hpp>
 #include <boost/integer/detail/bft/proxy_reference_policy.hpp>
 
-// TODO: re evaluate if this is needed or not.
-// #include <boost/integer/detail/bft/msvc_fixes/msvc_fix_includes.hpp>
 
 
 namespace boost {

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bft_element.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bft_element.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bft_element.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -17,7 +17,7 @@
             typename NameType,
             typename Offset,
             typename FieldWidth,
- typename Mask = mpl::void_,
+ typename Mask = mpl::void_,
             typename Policy = mpl::void_
>
 struct bitfield_element {

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bitfield_tuple_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bitfield_tuple_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bitfield_tuple_impl.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -41,11 +41,8 @@
  * preconditions and dealing with the parsed arguments. This is the base class
  * for bitfield_tuple.
  *
- *
  * Base Class preconditions.
  *
- *
- *
  * 1) The bitfields specified must not exceed the bitwidth of the storage type.
  * Enforced. Not going any where, but may be redefined or altered based
  * on if I allow the supplied storage type to be an array.
@@ -71,10 +68,7 @@
>,
         typename detail::deduce_storage_type<offset>::type,
         processed_storage_type
- >::type storage_type;
-
-
-
+ >::type storage_type;
 
     // Precondition: the offet at the end of everything must be the
     // the same as or less then the bit_width of the storage type.

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/tag_of.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/tag_of.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/tag_of.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -10,15 +10,15 @@
 
 namespace boost { namespace fusion {
 
- struct bitfield_tuple_tag;
-
- namespace traits {
-
- /** bit_T_group specilization. */
- template < BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS()>
- struct tag_of< ::boost::bitfield_tuple< BOOST_BFT_SPECILIZATION_PARAM_LIST() > >{
- typedef bitfield_tuple_tag type;
- };
+struct bitfield_tuple_tag;
+
+namespace traits {
+
+/** bit_T_group specilization. */
+template < BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS()>
+struct tag_of< ::boost::bitfield_tuple< BOOST_BFT_SPECILIZATION_PARAM_LIST() > >{
+ typedef bitfield_tuple_tag type;
+};
 
 
 }}} // end boost::fusion::traits

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/make_bitfield_tuple.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/make_bitfield_tuple.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/make_bitfield_tuple.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -43,9 +43,20 @@
                     BOOST_MAKE_BFT_FUNCTION_PARAM, \
                     BOOST_BFT_NOTHING )
 
+/** Helps create functions to assign values into the bitfield tuple.
+ * Generates Pattern
+ * detail::assign_parameter_to_bft<n>(bft, parameter##n);
+ */
 #define BOOST_MAKE_BFT_ASSIGN_FUNCTION_CALL(z,n,data)\
     detail::assign_parameter_to_bft<n>(bft, parameter##n);
 
+
+/** Helps create a sequence of functions to assign values into the
+ * bitfield_tuple.
+ * Generates Pattern
+ * detail::assign_parameter_to_bft<0>(bft, parameter0); ...
+ * detail::assign_parameter_to_bft<TO>(bft, parameter## TO);
+ */
 #define BOOST_MAKE_BFT_GENERATE_ASSIGNMENT_CALLS( TO ) \
     BOOST_PP_REPEAT_FROM_TO( \
         0,\
@@ -54,7 +65,16 @@
         BOOST_BFT_NOTHING )
 
 
-#define BOOST_MAKE_BFT_FUNCTION(z, N, data) \
+/** Helps create a make bitfield_tuple function for the bitfield_tuple.
+ * Generates Pattern
+ * template <typename BitfieldTuple, BOOST_MAKE_BFT_TEMPLATE_PARAMETERS(N)>
+ * BitfieldTuple make_bitfield_tuple(BOOST_MAKE_BFT_FUNCTION_PARAMETERS(N)) {
+ * BitfieldTuple bft;
+ * BOOST_MAKE_BFT_GENERATE_ASSIGNMENT_CALLS(N);
+ * return bft;
+ * }
+ */
+#define BOOST_MAKE_BFT_FUNCTION(z, N, data) \
     template <typename BitfieldTuple, BOOST_MAKE_BFT_TEMPLATE_PARAMETERS(N)> \
     BitfieldTuple make_bitfield_tuple(BOOST_MAKE_BFT_FUNCTION_PARAMETERS(N)){ \
         BitfieldTuple bft; \
@@ -62,6 +82,23 @@
         return bft; \
     }
 
+/** Helps create a make a sequence of make_bitfield_tuple functons for the
+ * bitfield_tuple.
+ * Generates Pattern
+ * template <typename BitfieldTuple, BOOST_MAKE_BFT_TEMPLATE_PARAMETERS(0)>
+ * BitfieldTuple make_bitfield_tuple(BOOST_MAKE_BFT_FUNCTION_PARAMETERS(0)) {
+ * BitfieldTuple bft;
+ * BOOST_MAKE_BFT_GENERATE_ASSIGNMENT_CALLS(0);
+ * return bft;
+ * }
+ * ...
+ * template <typename BitfieldTuple, BOOST_MAKE_BFT_TEMPLATE_PARAMETERS(N)>
+ * BitfieldTuple make_bitfield_tuple(BOOST_MAKE_BFT_FUNCTION_PARAMETERS(N)) {
+ * BitfieldTuple bft;
+ * BOOST_MAKE_BFT_GENERATE_ASSIGNMENT_CALLS(N);
+ * return bft;
+ * }
+ */
 #define BOOST_MAKE_BFT_OVERLOADS() \
     BOOST_PP_REPEAT_FROM_TO( \
         1,\
@@ -69,136 +106,13 @@
         BOOST_MAKE_BFT_FUNCTION,\
         BOOST_BFT_NOTHING )
 
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable : 4244)
-#endif
-/** This is a function which is used to assign a value into a bitfield_tuple
- * as well as remove the actual mpl::void_* from the parameter list through
- * specialization.
- */
-template <std::size_t Index, typename BitfieldTuple, typename ParameterType>
-inline void assign_parameter_to_bft(BitfieldTuple& bft, ParameterType value) {
- bft.template get<Index>() = value;
-}
-
-template <std::size_t Index, typename BitfieldTuple>
-inline void assign_parameter_to_bft(BitfieldTuple&, mpl::void_*) { }
-
-template <std::size_t Index, typename BitfieldTuple>
-inline void assign_parameter_to_bft(BitfieldTuple&, void*) { }
-
-#if BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // end detail
-
-BOOST_MAKE_BFT_OVERLOADS()
-
-} // end boost::detail::msvc_fixes
-
-
-#if 0
-namespace boost { namespace detail {
-
-#ifdef BOOST_MSVC
-
-template <typename T>
-struct bft_create_param_fix_return_type {
- typedef T type;
-};
-
-template <typename ReturnType, typename NameType, typename Offset, typename Width>
-struct bft_create_param_fix_return_type< bitfield_element<ReturnType,NameType,Offset,Width> >{
- typedef ReturnType type;
-};
-
-
-
-template <typename BitfieldTuple, std::size_t Index>
-struct get_create_parameter {
- // check for valid Index.
- typedef typename mpl::less<
- mpl::size_t<Index>,
- typename mpl::size<
- typename BitfieldTuple::members
- >::type
- >::type is_valid_index;
-
- typedef typename mpl::if_<
- is_valid_index,
- typename mpl::at_c<
- typename BitfieldTuple::members,
- Index
- >::type,
- mpl::void_*
- >::type element_type;
-
- typedef typename bft_create_param_fix_return_type<element_type>::type type;
-};
-
-// get_create_parameter<test_tuple,0>::is_valid_index
-/*
-BOOST_MPL_ASSERT(( get_create_parameter<test_tuple,1>::is_valid_index ));
-BOOST_MPL_ASSERT(( get_create_parameter<test_tuple,2>::is_valid_index ));
-BOOST_MPL_ASSERT(( get_create_parameter<test_tuple,3>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,4>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,5>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,6>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,7>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,8>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,9>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,10>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,11>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,12>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,13>::is_valid_index ));
-BOOST_MPL_ASSERT_NOT(( get_create_parameter<test_tuple,14>::is_valid_index ));
-*/
-
-#else
-
-/** Used to generate a function parameter for the create function used
- * with make_bitfield_tuple
- */
-template <typename T>
-struct bft_create_param_fix_return_type {
- typedef typename T::return_type type;
-};
-
-template <>
-struct bft_create_param_fix_return_type< mpl::void_ > {
- typedef mpl::void_* type;
-};
-
-
-template <typename BitfieldTuple, std::size_t Index>
-struct get_create_parameter {
- typedef typename mpl::if_<
- typename mpl::less<
- mpl::size_t<Index>,
- typename mpl::size<
- typename BitfieldTuple::members
- >::type
- >::type,
- typename bft_create_param_fix_return_type<
- typename mpl::at_c<
- typename BitfieldTuple::members,
- Index
- >::type
- >::type,
- mpl::void_*
- >::type type;
-};
-
-#endif
-
 
 
 #ifdef BOOST_MSVC
 #pragma warning(push)
 #pragma warning(disable : 4244)
 #endif
+
 /** This is a function which is used to assign a value into a bitfield_tuple
  * as well as remove the actual mpl::void_* from the parameter list through
  * specialization.
@@ -211,75 +125,22 @@
 template <std::size_t Index, typename BitfieldTuple>
 inline void assign_parameter_to_bft(BitfieldTuple&, mpl::void_*) { }
 
-template <std::size_t Index, typename BitfieldTuple>
-inline void assign_parameter_to_bft(BitfieldTuple&, void*) { }
-
 #if BOOST_MSVC
 #pragma warning(pop)
 #endif
 
 } // end detail
 
+BOOST_MAKE_BFT_OVERLOADS()
 
-#ifndef BOOST_MSVC
-/** I really don't like having to do this but it really is the Only way
- * its possible (by using macros thats is)
- * This is used to create parameters for the static call function
- * inside of make_bitfield_tuple.
- */
-#define BOOST_MAKE_BITFIELD_TUPLE_SINGLE_PARAMETER(z, n, data ) \
- typename detail::get_create_parameter<BitfieldTuple, n>::type \
- parameter ## n = 0
-
-
-/** This macro is used for creating the list of parameters inside of the
- * make_bitfield_tuple's create function.
- * Creates the following pattern
- * From 0 to n
- * typename detail::get_create_parameter<BitfieldTuple, 0>::type \
- * parameter0 = 0, ...
- * typename detail::get_create_parameter<BitfieldTuple, n>::type \
- * parametern = 0
- */
-#define BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARAMETERS() \
- BOOST_PP_ENUM( BOOST_BFT_PARAM_COUNT,\
- BOOST_MAKE_BITFIELD_TUPLE_SINGLE_PARAMETER, \
- BOOST_BFT_NOTHING )
-
-
-#define BOOST_MAKE_BITFIELD_TUPLE_ASSIGN_PARAMETER_TO_BFT_CALL(z,n,data)\
- detail::assign_parameter_to_bft<n>(bft, parameter##n);
-
-#define BOOST_MAKE_BITFIELD_TUPLE_CREATE_FUNCTION_PARSE_ARGUMENTS() \
- BOOST_PP_REPEAT_FROM_TO( \
- 0,\
- BOOST_BFT_PARAM_COUNT, \
- BOOST_MAKE_BITFIELD_TUPLE_ASSIGN_PARAMETER_TO_BFT_CALL,\
- BOOST_BFT_NOTHING )
-
-
-/** This can be used so that I can deduce the correct types for the arguments of
- * the function at compile time and make the function callible at run time
- * and make that function type safe.
- * 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. So
- * I felt that the name should reflect that.
- */
-
-template <typename BitfieldTuple>
-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
+#undef BOOST_MAKE_BFT_PARAM
+#undef BOOST_MAKE_BFT_TEMPLATE_PARAMETERS
+#undef BOOST_MAKE_BFT_FUNCTION_PARAM
+#undef BOOST_MAKE_BFT_ASSIGN_FUNCTION_CALL
+#undef BOOST_MAKE_BFT_GENERATE_ASSIGNMENT_CALLS
+#undef BOOST_MAKE_BFT_FUNCTION
+#undef BOOST_MAKE_BFT_OVERLOADS
 
 #endif
 
-} // end boost
-#endif
-#endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/proxy_reference_policy.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/proxy_reference_policy.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/proxy_reference_policy.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -45,6 +45,8 @@
     storage_type& _field;
 };
 
+
+
 /** This is the policy which is going to be used for calculating the correct
  * policy for retrieving the data from inside of teh bitfield_tuple
  * this is instead of the bitfield being the policy.
@@ -66,10 +68,6 @@
>,
         typename mpl::if_<
             is_pod<StorageType>,
- // this needs to be something else other then bitfield
- // I believe that this should be the orignal version
- // of bitfield because that will optimize better then
- // the newer version.
                 ::boost::integer::bitfield_policy<
                     StorageType,
                     Offset::value,

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/reference_builder.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/reference_builder.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/reference_builder.hpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -37,7 +37,7 @@
                 typename BitfieldTuple::members
>::type
>
- >::type type;
+ >::type type;
 };
 
 /** Returns an element by which has a given name. */
@@ -54,7 +54,7 @@
                 Name
>
>::type
- >::type type;
+ >::type type;
 };
 
 /** Returns an element from members within bitfield_tuple

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/align_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/align_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/align_test.cpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -16,9 +16,6 @@
 struct blue;
 struct salmon;
 
-
-
-
 int main() {
 
     // test case where alignment set the next bit to 32.

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/filler_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/filler_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/filler_test.cpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -29,7 +29,9 @@
 
 int main() {
     
- int temp = mpl::at_c<test_tuple::members, 2>::type::offset::value - (mpl::at_c<test_tuple::members, 1>::type::offset::value +
+ int temp = mpl::at_c<test_tuple::members, 2>::type::offset::value -
+ (mpl::at_c<test_tuple::members, 1>::type::offset::value
+ +
         mpl::at_c<test_tuple::members, 1>::type::field_width::value);
     
     BOOST_ASSERT(( temp == 3 ));

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-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -27,8 +27,7 @@
> test_tuple;
 
 int main() {
- {
-
+ {
         test_tuple bft = make_bitfield_tuple<test_tuple>(1,2,4,true);
         BOOST_ASSERT(( bft.get<red>() == 1 ));
         BOOST_ASSERT(( bft.get<green>() == 2 ));

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_member_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_member_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_member_test.cpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -6,6 +6,7 @@
 #include <boost/integer/bitfield_tuple.hpp>
 #include <boost/detail/lightweight_test.hpp>
 #include <boost/type_traits/is_same.hpp>
+
 using namespace boost;
 using namespace boost::bitfields;
 

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_parsing_meta_function_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_parsing_meta_function_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_parsing_meta_function_test.cpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -16,20 +16,24 @@
     {
         // Testing to make sure that if there is a bit at the first position
         // that 0 is correctly returned.
- typedef count_leading_zeros< boost::bits_mask<unsigned int, 31> >::type test_t1;
+ typedef count_leading_zeros< boost::bits_mask<
+ unsigned int, 31> >::type test_t1;
         BOOST_TEST((test_t1::value == 0 ));
 
         // testing to make sure that the test passes if the last bit is 1.
- typedef count_leading_zeros<boost::bits_mask<unsigned int,0> >::type test_t2;
+ typedef count_leading_zeros<boost::bits_mask<
+ unsigned int,0> >::type test_t2;
         BOOST_TEST( test_t2::value == 31 );
     }
 
     // count trailing zeros test.
     {
- typedef count_trailing_zeros<boost::bits_mask<unsigned int,31> >::type test_1;
+ typedef count_trailing_zeros<boost::bits_mask<
+ unsigned int,31> >::type test_1;
         BOOST_TEST( test_1::value == 31 );
 
- typedef count_trailing_zeros<boost::bits_mask<unsigned int,0> >::type test_2;
+ typedef count_trailing_zeros<boost::bits_mask<
+ unsigned int,0> >::type test_2;
         BOOST_TEST( test_2::value == 0 );
     }
     return boost::report_errors();

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/template_expansion_marco_test.cpp 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -12,12 +12,9 @@
 
 using namespace boost;
 using namespace boost::bitfields;
-//~ using namespace std;
 
 template <BOOST_MAKE_BFT_TEMPLATE_PARAMS()>
-struct ham_bone {
- virtual void foo() { }
-};
+struct ham_bone { };
 
 int main() {
     ham_bone<int,int,int,int,int,int,int,int,int,int> temp;

Modified: sandbox/SOC/2010/bit_masks/notes.txt
==============================================================================
--- sandbox/SOC/2010/bit_masks/notes.txt (original)
+++ sandbox/SOC/2010/bit_masks/notes.txt 2010-07-22 12:22:34 EDT (Thu, 22 Jul 2010)
@@ -1,3 +1,269 @@
+List of TODO's throughout the bitfield_tuple
+
+1) template_expansion_macros.hpp
+ a) TODO: Refactor the macro's which are availible for use external to the
+ data structure then undef all of the rest before the end of the data
+ structure.
+
+ // Internally used Macro's
+ #undef BOOST_MAKE_BFT_TEMPLATE_PARAMS
+ #undef BOOST_BFT_MAKE_PARAMS
+ #undef BOOST_BFT_UNPACK_CALL
+ #undef BOOST_BFT_UNPACK_PARAMS
+ #undef BOOST_BFT_BASE_TEMPLATE_PARAMS
+ #undef BOOST_BFT_PARAMETER_LIST
+ #undef BOOST_BFT_PARAM_LIST
+
+ // externally Available Macros
+ BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS
+ BOOST_BFT_SPECILIZATION_PARAM_LIST
+
+ Main issue is that the externally Available macros are implemented in terms
+ of internal macros and undef'ing the internal macros could then cause trouble
+ when the macros which are part of the interface are used outside of
+ bitfield_tuple's implementation.
+
+ b) MAYBE: Rename some of the internal use only macros so they don't
+ get confused with macros for external use.
+
+2) reference_builder.hpp
+ a) TODO: Move the following meta-functions into the boost namespace
+ and create some documentation on how they are used/when they are useful.
+ I ) template <typename BitfieldTuple, typename Name>
+ struct name_exists;
+
+ II ) template <typename BitfieldTuple, typename Name>
+ struct find_by_element_name;
+
+ III ) template <typename BitfieldTuple, std::size_t Index>
+ struct find_by_element_index;
+
+ IV ) template <typename BitfieldTuple, typename Name>
+ struct get_reference_type_by_name;
+ a) Rename to get_proxy_type_by_name.
+ b) create documentation for this meta function.
+
+ V ) template <typename BitfieldTuple, std::size_t Index>
+ struct get_reference_type_by_index;
+ a) Rename to get_proxy_type_by_index.
+ b) Create documentation for this meta function.
+
+ b) TODO: Consider the removal of the following meta-function if it isn't
+ used ad it doesn't seem like it is. It does however have some documentation.
+
+ I ) template <
+ typename BitfieldTuple,
+ typename Name,
+ typename CQualifier
+ >
+ struct make_reference_type_by_name;
+
+3) proxy_reference_policy.hpp
+ a) Create the custom member.
+ b) Create documentation for how to create your own policy.
+ c) This may need additional documentation however it looks good currently.
+
+4) pointer_parsing_meta_functions.hpp
+ a) think of a better name for this file.
+ b) template <typename Mask, typename Policy>
+ struct pointer_member_info;
+ I ) Do impact analysis for the removal of this structure.
+ I don't believe its used or needed any more.
+
+ c) template <typename T>
+ struct get_mask_type;
+ I ) This type needs a new name something like uintptr_t or
+ something simple like that.
+ II ) This "could" be removed IF there is an unsigned integral type
+ which is always the same size as a pointer. There may be
+ however I don't know where or what it is currently.
+ III ) Consider making this also do short or 16 bit pointers.
+ IV ) Why is this a template? I should fix this as a pointer to one
+ type is always the same size as another.
+
+ d) Create additional tests for count leading and trailing zero
+ meta-functions.
+
+5) pointer_packing_policy.hpp
+ a) Adjust the alignment check to check alignment against the 0 bit in stead
+ of based on the offset.
+ b) Change the following specialization so that this isn't needed
+ basically this requires a shift from the pointer, when there shouldn't
+ be.
+ I ) template <
+ typename Mask,
+ typename Offset,
+ typename ValueType,
+ typename StorageType
+ >
+ struct apply_impl_no_shift <
+ Mask,
+ Offset,
+ ValueType,
+ StorageType,
+ false
+ >;
+ c) Finish the pointer specialization so that fewer specialization are
+ needed there should be aligned and unaligned and that really should
+ be all. Unless there there is some issue.
+
+6) name_lookup.hpp
+ a) everything is fine here.
+
+7) make_bitfield_tuple.hpp
+ a) Everything here has already been fixed.
+
+8) bitfield_tuple_impl.hpp
+ a) Everything looks OK here.
+
+9) bft_element.hpp
+ a) change name to bitfield_element.hpp - eventually.
+
+10) arg_parse_impl.hpp
+ a) Finish the pointer parsing stuff.
+ I ) This includes the pointer shifting stuff as well.
+ II ) Remove the fake static assertion which deals with
+ shifted pointers and actually implement something that works!
+
+ b) Implement the specialization for custom members.
+ I ) This could be more of a pain, however it seems quite simple
+ after implementing the pointer stuff.
+
+ c) Add compile-failure test for the mask type not being the same size as
+ a pointer.
+
+11) folder: msvc_fixes/
+ a) Remove this folder and remove the include from within bitfield_tuple.
+
+12) bitfield_iterator.hpp - Fusion Extension
+ A) Add OR remove const functions because fusion may be a non const only
+ thing. Other option is to make a const iterator but that could be more
+ complex then I'm willing to deal with at the moment.
+
+13) Things to add to public/user documentation:
+ a) Make note of the issue with retrieving a proxy reference type in a
+ const scope and how to deal with it if they wish to create their own
+ proxy reference type OR if they wish to actually return the proxy
+ reference type.
+
+14) bitfield_tuple.hpp
+ a) Consider renaming disable_if_reference_type_by_name
+ to
+ disable_if_proxy_ref_type_by_name
+ or something like that.
+ This would only be for clarification measures as this type doesn't use
+ real reference types.
+
+
+Test file review
+1) variadic_sequence_testing.cpp
+
+ a) Replicate this test all the way up to 50 at intervals of 10.
+ b) Switch to using <boost/detail/lightweight_test.hpp> framework.
+ c) Add test to test the limit of the bitfield_tuple so that I can be
+ assured that the limit is working correctly.
+ d) remove testing from the end of file name.
+
+2) to_string_testing.cpp
+ a) Remove this its not part of bitfield_tuple any more.
+
+3) template_expansion_marco_test.cpp
+ a) Make this an actual test to make sure that everything is correctly
+ getting expanded.
+ b) Find a better way to test this.
+ c) remove test from name.
+ d) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+4) reference_builder_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) test the rest of the reference builder functions
+ I ) Name exists
+ II ) find_by_element_name
+ III ) find_by_element_index
+ IV ) make_reference_type_by_name <-- Maybe, if its actually being used.
+ V ) enable_if_reference_type_by_index
+ VI ) get_reference_type_by_name
+ VII ) get_reference_type_by_index
+
+5) pointer_parsing_meta_function_test.cpp
+ a) Remove test from name.
+ c) Other then name this is pretty complete.
+
+6) pointer_member_test.cpp
+ a) remove test from name.
+ b) This test is incomplete because the implementation isn't completed yet.
+ c) I need a macro which will tell me if the test is 32 bit or 64 bit
+ Currently the _LP64 should only work for GCC however I need a more
+ universal one.
+
+7) name_accessor_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+8) make_bft_testing.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c)
+
+9) make_bft_testing.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) This may need additional test to make sure that the macros are correctly
+ generating the code for the correct number of valid parameters.
+
+10) get_interface_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) Need to do more const interface testing.
+
+11) fusion_iterator_testing.cpp
+ a) remove testing from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) Not sure just how I should test the iterator. This may be good as it
+ however that doesn't mean that it should just stay as is. Look into
+ other fusion iterator tests.
+
+12) fusion_integration_testing.cpp
+ a) remove testing from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+13) flag_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+14) filler_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+15) deduced_storage_type_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+16) deduced_storage_type_long_long_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) Maybe merge this with the other storage type.
+
+17) custom_member_test.cpp
+ a) remove test from name.
+ b) Implement before testing this.
+
+18) bitfield_tuple_test.hpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+ c) remove previous dependency on test_list_type.hpp
+
+19) align_test.cpp
+ a) remove test from name.
+ b) Change to using the <boost/detail/lightweight_test.hpp> framework.
+
+
+
+TO BE ADDED TO TESTS SECTION
+Test files which need to be created and have tests placed in them!
+
+
 This is used for keeping track of different ideas about different possible
 interfaces or implementation of bit masks.
 


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