Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64390 - in sandbox/SOC/2010/bit_masks: . boost/integer boost/integer/bitfield_tuple boost/integer/detail/bft boost/integer/detail/bft/ext boost/integer/detail/bft/ext/fusion lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-27 13:29:54


Author: bbartman
Date: 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
New Revision: 64390
URL: http://svn.boost.org/trac/boost/changeset/64390

Log:
migrated all parts of the bitfield_tuple into the bitfields_namespace
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp | 5
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/element.hpp | 18 +
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_metafunctions.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/pointer.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple_fwd.hpp | 6
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parsing_meta_functions.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bft_element.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/bitfield_tuple_impl.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/custom_packing_policy.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/deduce_storage.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/bitfield_iterator.hpp | 7
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/at_impl.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/begin_impl.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/end_impl.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/tag_of.hpp | 2
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/make_bitfield_tuple.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/mask_shift_indicators.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/name_lookup.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/policy_creation_detail.hpp | 4
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/proxy_reference_policy.hpp | 11 +
   sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/reference_builder.hpp | 4
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/bitfield_tuple_test.cpp | 2
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp | 4
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_member_test.cpp | 42 ++--
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/pointer_parsing_meta_function_test.cpp | 2
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/reference_builder_test.cpp | 4
   sandbox/SOC/2010/bit_masks/notes.txt | 293 ---------------------------------------
   29 files changed, 94 insertions(+), 364 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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -34,8 +34,7 @@
 #include <boost/integer/bitfield_tuple/get_free_function.hpp>
 
 
-namespace boost {
-
+namespace boost { namespace bitfields {
 
 template < BOOST_MAKE_BFT_TEMPLATE_PARAMS() >
 struct bitfield_tuple
@@ -217,7 +216,7 @@
     storage_type _data;
 };
 
-} // end boost
+}} // end boost::bitfields
 
 
 #ifdef BOOST_MSVC

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/element.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/element.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/element.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -9,18 +9,22 @@
 #include <boost/integer/bitfield_tuple/interface_metafunctions.hpp>
 #include <cstddef>
 
-namespace boost {
-namespace bitfields {
+namespace boost { namespace bitfields {
 
-
-template<std::size_t Index, typename BitfieldTuple>
+template<typename BitfieldTuple, std::size_t Index>
 struct element {
- typedef typename get_proxy_reference_type_by_index< BitfieldTuple, Index >::type type;
+ typedef typename get_proxy_reference_type_by_index<
+ BitfieldTuple,
+ Index
+ >::type type;
 };
 
-template<typename Name, typename BitfieldTuple>
+template<typename BitfieldTuple, typename Name>
 struct element_n {
- typedef typename get_proxy_reference_type_by_name< BitfieldTuple, Name >::type type;
+ typedef typename get_proxy_reference_type_by_name<
+ BitfieldTuple,
+ Name
+ >::type type;
 };
 
 }} // end boost::bitfields

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_metafunctions.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_metafunctions.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/interface_metafunctions.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -7,7 +7,7 @@
 #ifndef BOOST_BFT_INTERFACE_META_FUNCITONS_HPP
 #define BOOST_BFT_INTERFACE_META_FUNCITONS_HPP
 
-namespace boost {
+namespace boost { namespace bitfields {
 
 /** Checks to see if a name exists.
  * returns mpl::true_ or mpl::false_
@@ -127,6 +127,6 @@
> type;
 };
 
-} // end boost
+}} // end boost::bitfields
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/pointer.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/pointer.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple/pointer.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -27,8 +27,8 @@
     typename ReturnType,
     typename Name,
     typename Mask = high_bits_mask<
- typename ::boost::detail::ptr_mask_type,
- bit_width< typename ::boost::detail::ptr_mask_type >::value - 2
+ typename detail::ptr_mask_type,
+ bit_width< typename detail::ptr_mask_type >::value - 2
>
>
 struct pointer;

Modified: sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple_fwd.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple_fwd.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple_fwd.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -6,12 +6,14 @@
 
 #ifndef BOOST_BITFIELD_TUPLE_FWD_HPP
 #define BOOST_BITFIELD_TUPLE_FWD_HPP
+#include <boost/integer/bitfield_tuple/interface_macros.hpp>
 
-namespace boost {
+
+namespace boost { namespace bitfields {
 
 template < BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS() >
 struct bitfield_tuple;
 
-}// end boost
+}} // end boost::bitfields
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parse_impl.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -33,7 +33,7 @@
 
 
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 /** This is the empty which prevents the user from supply things which are
  * not enclosed within either a member template or a storage template.
@@ -449,6 +449,6 @@
 };
 
 
-}} // end boost::detail
+}}} // end boost::bitfields::detail
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parsing_meta_functions.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parsing_meta_functions.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/arg_parsing_meta_functions.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -17,7 +17,7 @@
 /** This file contains metafunctions which are used to do complex operations
  * on the Mask provided by the user.
  */
-namespace boost { namespace detail {
+namespace boost { namespace bitfields { namespace detail {
 
 /** This is an integral type which is the same size as a pointer on a 32 or 64
  * bit system
@@ -132,6 +132,6 @@
     typedef typename ptr_detail::ctz_helper<Mask>::type type;
 };
 
-}}} // end boost::detail::pointer_member
+}}}} // end boost::bitfields::detail::pointer_member
 
 #endif

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -8,7 +8,7 @@
 #include <boost/mpl/void.hpp>
 
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields { namespace detail {
 
 /** This is the type which sits inside the mpl vector type.
  * This has all information for constructing a bitfield.
@@ -39,6 +39,6 @@
 };
 
 
-}} // end boost::detail
+}}} // end boost::detail
 
 #endif

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -22,7 +22,7 @@
 #include <boost/integer/detail/bft/arg_parse_impl.hpp>
 #include <boost/integer/detail/bft/deduce_storage.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 // The following preprocessor MACRO only used for writing clarity, it's only
 // used once and then undef'ed before the end of this file.
@@ -79,7 +79,7 @@
 
 };
 
-}} // end boost::detail
+}}} // end boost::detail
 
 #undef BOOST_BFT_ARG_PROCESSING
 

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/custom_packing_policy.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/custom_packing_policy.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/custom_packing_policy.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -8,7 +8,7 @@
 #define BOOST_BITFIELD_TUPLE_CUSTOM_PACKING_POLICY_HPP
 #include <boost/integer/detail/bft/policy_creation_detail.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 template <
     typename Mask,
@@ -32,6 +32,6 @@
     { };
 };
 
-}} // end boost::detail
+}}} // end boost::detail
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/deduce_storage.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/deduce_storage.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/deduce_storage.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -11,7 +11,7 @@
 #include <boost/static_assert.hpp>
 #include <boost/config.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 /** Meta functions used for deducing the type of storage that should be used if
  * the user doesn't supply a storage type to a bitfield_tuple.
@@ -42,6 +42,6 @@
>::type type;
 };
 
-}} // end boost::detail
+}}} // end boost::detail
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/bitfield_iterator.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/bitfield_iterator.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/bitfield_iterator.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -15,8 +15,7 @@
 #include <boost/fusion/iterator/iterator_facade.hpp>
 #include <boost/mpl/void.hpp>
 
-namespace boost {
-
+namespace boost { namespace bitfields{
 namespace detail {
 struct bft_category
   : boost::fusion::random_access_traversal_tag,
@@ -58,7 +57,7 @@
     /** Fusion Extension: value_of */
     template<typename Iter>
     struct value_of {
- typedef typename boost::get_proxy_reference_type_by_index<
+ typedef typename get_proxy_reference_type_by_index<
             BitfieldTuple,
             Iter::index::value
>::type type;
@@ -177,7 +176,7 @@
 
 };
 
-} // end boost::fusion
+}} // end boost::bitfields
 
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/at_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/at_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/at_impl.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -21,7 +21,7 @@
 
     template <typename BitfieldTuple, typename N>
     struct apply {
- typedef typename ::boost::get_proxy_reference_type_by_index<
+ typedef typename ::boost::bitfields::get_proxy_reference_type_by_index<
             BitfieldTuple,
             N::value
>::type type;

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/begin_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/begin_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/begin_impl.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -20,7 +20,7 @@
 struct begin_impl< bitfield_tuple_tag > {
     template<typename BitfieldTuple>
     struct apply {
- typedef bitfield_tuple_iterator<BitfieldTuple,0> type;
+ typedef bitfields::bitfield_tuple_iterator<BitfieldTuple,0> type;
         static type call(BitfieldTuple& bft) {
             return type(bft);
         }

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/end_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/end_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/ext/fusion/end_impl.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -22,7 +22,7 @@
 
     template <typename BitfieldTuple>
     struct apply {
- typedef bitfield_tuple_iterator<
+ typedef bitfields::bitfield_tuple_iterator<
             BitfieldTuple,
             mpl::size<
                 typename BitfieldTuple::members

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -16,7 +16,7 @@
 
 /** bit_T_group specilization. */
 template < BOOST_BFT_TEMPLATE_ARGS_NO_DEFAULTS()>
-struct tag_of< ::boost::bitfield_tuple< BOOST_BFT_SPECILIZATION_PARAM_LIST() > >{
+struct tag_of< ::boost::bitfields::bitfield_tuple< BOOST_BFT_SPECILIZATION_PARAM_LIST() > >{
     typedef bitfield_tuple_tag type;
 };
 

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -9,7 +9,7 @@
 #include <boost/config.hpp>
 #include <cstddef>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 /** Used to help generate psudo variadic template paramerer apperance.
  * This make the typename T##N = mpl::void_ pattern.
@@ -133,7 +133,7 @@
 
 BOOST_MAKE_BFT_OVERLOADS()
 
-} // end boost
+}} // end boost::bitfields
 #undef BOOST_MAKE_BFT_PARAM
 #undef BOOST_MAKE_BFT_TEMPLATE_PARAMETERS
 #undef BOOST_MAKE_BFT_FUNCTION_PARAM

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/mask_shift_indicators.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/mask_shift_indicators.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/mask_shift_indicators.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -7,12 +7,12 @@
 #define BOOST_BITFIELD_TUPLE_MASK_SHIFT_INDICATORS_HPP
 #include <cstddef>
 
-namespace boost { namespace detail { namespace bit_shift {
+namespace boost { namespace bitfields{ namespace detail { namespace bit_shift {
 
 template <std::size_t Shift> struct right;
 template <std::size_t Shift> struct left;
 struct none;
 
-}}} // end boost::detail::bit_shift
+}}}} // end boost::bitfields::detail::bit_shift
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/name_lookup.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/name_lookup.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/name_lookup.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -9,7 +9,7 @@
 #include <boost/mpl/find_if.hpp>
 #include <boost/type_traits/is_same.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 
 /** This is a lambda expression which is passed to find_if
@@ -22,6 +22,6 @@
 { };
 
 
-}} // end boost::detail
+}}} // end boost::bitfields::detail
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/pointer_packing_policy.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -8,7 +8,7 @@
 #define BOOST_BITFIELD_TUPLE_POINTER_PACKING_POLICY_HPP
 #include <boost/integer/detail/bft/policy_creation_detail.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 template <
     typename Mask,
@@ -32,5 +32,5 @@
     { };
 };
 
-}} // end boost::detail
+}}} // end boost::bitfields::detail
 #endif

Modified: sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/policy_creation_detail.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/policy_creation_detail.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/detail/bft/policy_creation_detail.hpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -12,7 +12,7 @@
 #include <boost/integer/detail/bft/arg_parsing_meta_functions.hpp>
 #include <boost/integer/detail/bft/mask_shift_indicators.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 // detial's relating to the set and get functions.
 namespace policy_detail {
@@ -187,6 +187,6 @@
     typedef apply_impl<Mask,ValueType,StorageType,mask_shift> type;
 };
 
-}}} // end policy_detail
+}}}} // end boost::bitfields::detail::policy_detail
 
 #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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -13,7 +13,7 @@
 #include <boost/mpl/logical.hpp>
 #include <boost/mpl/if.hpp>
 
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 /** Wraps up a policy so that it has a similar interface to that of bitfield.
  * which basically means that since the policy itself only has static functions
@@ -25,14 +25,19 @@
     typename Policy
>
 struct policy_wrapper {
+ typedef policy_wrapper<StorageType,Policy> _self;
     typedef StorageType storage_type;
     typedef Policy field_policy;
     typedef typename field_policy::value_type value_type;
 
- policy_wrapper(storage_type& storage)
+ explicit policy_wrapper(storage_type& storage)
         :_field( storage )
     { }
 
+ policy_wrapper(_self const& pol_wraper)
+ :_field( pol_wraper._field )
+ { }
+
     void set(value_type rhs) {
         _field = field_policy::template apply<storage_type>::set(_field, rhs);
     }
@@ -91,6 +96,6 @@
 };
 
 
-}} // end boost::detial
+}}} // end boost::bitfields::detail
 
 #endif

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -15,7 +15,7 @@
  * and returning the correct reference type which will allow for only one
  * reference type class within bitfield_tuple.
  */
-namespace boost { namespace detail {
+namespace boost { namespace bitfields{ namespace detail {
 
 template <typename BitfieldTuple, typename Name>
 struct disable_if_proxy_reference_type_by_name {
@@ -98,6 +98,6 @@
 
 
 
-}} // end boost::detail
+}}} // end boost::bitfields::detail
 
 #endif

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/bitfield_tuple_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/bitfield_tuple_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/bitfield_tuple_test.cpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -27,7 +27,7 @@
     // testing bitfield_element
     {
         // bitfield_element
- typedef detail::bitfield_element<
+ typedef bitfields::detail::bitfield_element<
             int, red, mpl::size_t<5>, mpl::size_t<4>
> bft_element_test_1;
         BOOST_ASSERT(( is_same<bft_element_test_1::return_type, int>::value ));

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -19,7 +19,7 @@
 
 
     typedef mpl::vector<
- detail::bitfield_element<
+ bitfields::detail::bitfield_element<
             int,
             red,
             mpl::size_t<0>,
@@ -34,7 +34,7 @@
     // for looking up while useing the get<> function in side bitfield_tuple.
     typedef mpl::find_if<
         test_vect,
- detail::match_name<
+ bitfields::detail::match_name<
             mpl::_1,
             red
>

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -28,7 +28,7 @@
         BOOST_TEST((
             is_same<
                 test_type_1::storage_type,
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value
         ));
 
@@ -52,7 +52,7 @@
         BOOST_TEST((
             is_same<
                 test_type_2::storage_type,
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value
         ));
 
@@ -180,10 +180,10 @@
             member<unsigned int,i1,2>,
             pointer<int, rd,
                 bits_mask<
- detail::ptr_mask_type,
+ bitfields::detail::ptr_mask_type,
                     2,
                     bit_width<
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value - 4
>
>,
@@ -202,8 +202,8 @@
         int i = 70;
         
         // getting first 2 btis of pointer.
- detail::ptr_mask_type ptr = high_bits_mask<
- detail::ptr_mask_type,2>::value & detail::ptr_mask_type(&i);
+ bitfields::detail::ptr_mask_type ptr = high_bits_mask<
+ bitfields::detail::ptr_mask_type,2>::value & bitfields::detail::ptr_mask_type(&i);
 
         std::cout<< "value of &i: " << std::hex << &i << std::endl;
         std::cout<< "2 bits of &i: " << std::hex << ptr << std::endl;
@@ -218,8 +218,8 @@
         std::cout<< "Value of temp_ptr: " << std::hex << temp_ptr << std::endl;
 
         // rebuilding pointer.
- detail::ptr_mask_type temp_int = detail::ptr_mask_type(temp_ptr);
- temp_int |= detail::ptr_mask_type( ptr );
+ bitfields::detail::ptr_mask_type temp_int = bitfields::detail::ptr_mask_type(temp_ptr);
+ temp_int |= bitfields::detail::ptr_mask_type( ptr );
         temp_ptr = my_intptr_t(temp_int);
 
 
@@ -239,10 +239,10 @@
             member<unsigned int,i1,3>,
             pointer<int, rd,
                 bits_mask<
- detail::ptr_mask_type,
+ bitfields::detail::ptr_mask_type,
                     2,
                     bit_width<
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value - 4
>
>,
@@ -259,8 +259,8 @@
         int i = 70;
         
         // getting first 2 bits of pointer.
- detail::ptr_mask_type ptr = high_bits_mask<
- detail::ptr_mask_type,2>::value & detail::ptr_mask_type(&i);
+ bitfields::detail::ptr_mask_type ptr = high_bits_mask<
+ bitfields::detail::ptr_mask_type,2>::value & bitfields::detail::ptr_mask_type(&i);
 
         std::cout<< "value of &i: " << std::hex << &i << std::endl;
         std::cout<< "2 bits of &i: " << std::hex << ptr << std::endl;
@@ -272,8 +272,8 @@
 
         std::cout<< "Value of temp_ptr: " << std::hex << temp_ptr << std::endl;
 
- detail::ptr_mask_type temp_int = detail::ptr_mask_type(temp_ptr);
- temp_int |= detail::ptr_mask_type( ptr );
+ bitfields::detail::ptr_mask_type temp_int = bitfields::detail::ptr_mask_type(temp_ptr);
+ temp_int |= bitfields::detail::ptr_mask_type( ptr );
         temp_ptr = my_intptr_t(temp_int);
 
         std::cout<< "Value of temp_int: " << std::hex<< temp_int << std::endl;
@@ -289,10 +289,10 @@
     typedef bitfield_tuple<
         pointer<int, rd,
             bits_mask<
- detail::ptr_mask_type,
+ bitfields::detail::ptr_mask_type,
                 2,
                 bit_width<
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value - 4
>
>,
@@ -301,7 +301,7 @@
         BOOST_TEST((
             is_same<
                 test_type_8::storage_type,
- detail::ptr_mask_type
+ bitfields::detail::ptr_mask_type
>::value
         ));
 
@@ -309,8 +309,8 @@
         int i = 70;
         
         // getting first 2 bits of pointer.
- detail::ptr_mask_type ptr = high_bits_mask<
- detail::ptr_mask_type,2>::value & detail::ptr_mask_type(&i);
+ bitfields::detail::ptr_mask_type ptr = high_bits_mask<
+ bitfields::detail::ptr_mask_type,2>::value & bitfields::detail::ptr_mask_type(&i);
 
         std::cout<< "value of &i: " << std::hex << &i << std::endl;
         std::cout<< "2 bits of &i: " << std::hex << ptr << std::endl;
@@ -322,8 +322,8 @@
 
         std::cout<< "Value of temp_ptr: " << std::hex << temp_ptr << std::endl;
 
- detail::ptr_mask_type temp_int = detail::ptr_mask_type(temp_ptr);
- temp_int |= detail::ptr_mask_type( ptr );
+ bitfields::detail::ptr_mask_type temp_int = bitfields::detail::ptr_mask_type(temp_ptr);
+ temp_int |= bitfields::detail::ptr_mask_type( ptr );
         temp_ptr = my_intptr_t(temp_int);
 
         std::cout<< "Value of temp_int: " << std::hex<< temp_int << std::endl;

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -9,7 +9,7 @@
 
 #include <iomanip>
 #include <iostream>
-using namespace ::boost::detail::pointer_member;
+using namespace ::boost::bitfields::detail::pointer_member;
 
 int main() {
     // count leading zeros metafunction test.

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/reference_builder_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/reference_builder_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/reference_builder_test.cpp 2010-07-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -28,13 +28,13 @@
 
 int main() {
     {
- typedef detail::disable_if_proxy_reference_type_by_name<
+ typedef bitfields::detail::disable_if_proxy_reference_type_by_name<
             const test_tuple_1,
             salmon
>::type ref_t_1;
         std::size_t store_house = 0;
 
- typedef detail::disable_if_proxy_reference_type_by_name<
+ typedef bitfields::detail::disable_if_proxy_reference_type_by_name<
             test_tuple_1,
             salmon
>::type ref_t_2;

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-27 13:29:51 EDT (Tue, 27 Jul 2010)
@@ -57,7 +57,8 @@
 
 14) bitfield_tuple.hpp
 15) Remove old pointer plus bits stuff
-
+16) interface_meta_functions.hpp
+ a) Move all of the meta functions in side of time into namespace bitfields
 
 Test file review
 1) variadic_sequence_testing.cpp
@@ -179,7 +180,8 @@
 5) Create compile failure test for pointer member mask not being same size as
     pointer.
 6) Create compile Failure test for custom member mask being 0.
-
+7) Create test for element and element_n
+8) Create test for get_free_function.
 --------------------------------------------------------------------------------
 
 
@@ -212,289 +214,8 @@
 proxy reference type OR if they wish to actually return the proxy
 reference type.
 
---------------------------------------------------------------------------------
-
-
-This is used for keeping track of different ideas about different possible
-interfaces or implementation of bit masks.
-
-
-
-The bit_masks should be combinable (i.e. use recursive template), to allow for
-a combination of different masks to compose one mask.
-
-The bit_mask type is going to have an integral_c base class, which is going to
-hold the data which would make up the mask itself.
-
-Notes for later creating a test suite:
-The mask type will be one of the following built in data types OR one of the
-data types supplied by the boost.integer library.
-List to follow:
-char
-unsigned char
-short
-unsigned short
-long
-unsigned long
-int
-unsigned int
-long long
-unsigned long long
-
-
-integer types from boost integer:
-
-int_least8_t
-int_least16_t
-int_least32_t
-uint_least8_t
-uint_least16_t
-uint_least32_t
-
-
-The following types are available only if, after including <boost/cstdint.hpp>,
-the macro BOOST_NO_INT64_T is not defined:
-
-int_least64_t
-uint_least64_t
-
-The following fastest minimum-width integer types are provided for all platforms:
-
-int_fast8_t
-int_fast16_t
-int_fast32_t
-uint_fast8_t
-uint_fast16_t
-uint_fast32_t
-
-The following types are available only if, after including <boost/cstdint.hpp>,
-the macro BOOST_NO_INT64_T is not defined:
-
-int_fast64_t
-uint_fast64_t
-
-
-
-
-
-Interface Idea:
-All interface idea's need to be able to work with recursive templates.
-Also note that Andrew says that the beginning of this function is not
-actually going to be a meta function so don't try to make it one.
-
-
-Referencing bits inside a mask is right to left where right starts at 0 and left
-is the last index
-
-Simple interface:
-
-specify width of mask or type which the mask is going to be applied to,
-the offset in bits which a mask will begin, and the width the mask in bits.
-
-E.x. if some one would want to use the bit masks to specify a sub net mask
-this would be ideal for doing that.
-
-// starting at the 8th bit so picking done by index similar to an array.
-bit_mask<int, 7, 24>
-
-
-Integral Constant Specialization:
-
-Provide a Specialization of bit_mask which will take an integral constant
-from boost::mpl and create a bit mask from that.
-
-
-Specification of a mask through offsets and widths:
-
-Provide a mask which will take a combination of "pairs"* of offsets and widths.
-*NOT std::pair just some data that comes int 2's.
-
-A valid example of something like this would look like the following:
-// mask type followed by masks.
-bit_mask< int, mask<0,2>, mask<13,2> ... etc ... >
-
-
-
-NOTE for future Developement:
-Making Dynamic Bit masks instead of static.
-Possibly making this into a meta function instead of using this by itself.
-
-
-
-For the bit_mask tuple look at the interface used inside the stl's tuple
-that is the goal for that psudo-data structure (psudo-data structure as it isn't
-really intended to be instanced and doesn't store any actual data, just ICEs
-(Integral Constant Expressions NOT Internal Compiler Errors.)).
-
-
-------- Interface Ides for test, set, clear and flip ---------
-
-
-Thoughts from standard bitset's set member function.
-
-What it does is take size_t, bool and if bool is true it sets all bits in the
-expression. So it would be best to have meta-functions (one which specializes on
-true) to do the exact same thing for a bit_mask on compile time.
-
-
-
-
-Compile time interface only.
-
-For operations on masks which are compile and runtime try what Andrew suggested:
-Functors for the different operations so the following would work for
-compile time.
-
-
-
- Compile time set_bit meta-function
-
-// this would need to have a specialization for SetAll where set all is = to true.
-the setting of all bits is simply a shift to the right or left = to the width of
-the mask in bits then calling the ~ operator on the thing.
-
-
-// assuming T is some mask type.
-template <typename T, unsigned int N, bool SetAll = false >
-struct set_bit
- :integral_mask< T::value_type, T::value > // <--- this will do all of the internal
- // work as far as keeping types + value etc...
-{ };
-
-
- Compile time test_bit meta-function
-
-This meta function should take one mask and an integral value and check to see
-of the bit value at the position indicated by the integral value is set or not.
-This meta-function will evaluate to true or false if the bit is or isn't false.
-
-template <typename T, unsigned int N>
-struct test_mask_bit;
-
- Compile time flip_bit meta-function
-Intent is to specify either a single bit or all bits to be fliped. This meta-function
-will require one specilization as wll for std::numeric_limits<unsigned int>::max.
-
-template <typename T, unsigned int N = std::numeric_limits<unsigned int>::max >
-struct flip_mask_bit;
-
-
-
- Compile time clear_bit meta-function
-
-The intent of this function would be for clearing of a single bit or all bits
-from within a mask. This would also require a specilization for
-std::numeric_limits< unsigned int>::max.
-
-
-template <typename T, unsigned int N = std::numeric_limits<unsigned int>::max>
-struct clear_mask_bit;
-
-
-compile time + runtime interface.
-
-These are functors which provide runtime support for preforming regular masking
-operations with complie time composed masks. The reasoning behind creating functions
-which create a mask on compile time and that mask would then be applied to some
-integral type T at a later time.
-
-
-
- Compile + run time set interface.
-template <typename T, unsigned int Offset>
-struct set_single_bit {
- T operator()(T x);
-};
-
-template <typename T, unsigned int FromIndex, unsigned int ToIndex>
-struct set_bit_range {
- T operator()(T x);
-};
-
-template <typename T>
-struct set_all_bits {
- T operator()(T x);
-};
-
-template <typename T, typename bit_mask>
-struct set_selected {
- T opeator()(T x);
-};
-
-
- Compile + run time test interface.
- Compile + run time flip interface.
-
- Compile + run time clear interface.
-
-clear one, clear many, clear all, clear selected
-
-Create masks based on T, and the index of the bit to clear
-and clear the bit at location Offset.
-
-template <typename T, unsigned int Offset>
-struct clear_single_bit {
- T operator()(T x);
-};
-
-template <typename T, unsigned int FromIndex, unsigned int ToIndex>
-struct clear_bit_range {
- T operator()(T x);
-};
-
-template <typename T>
-struct clear_all_bits {
- T operator()(T x);
-};
-
-template <typename T, typename bit_mask>
-struct clear_selected {
- T opeator()(T x);
-};
-
-
-
-runtime only interface.
-
-
- runtime test
-single bit test.
-template <typename T>
-bool test(T bits, size_t N);
-
-range test + test all
-template <typename T>
-bool test(T bits, size_t from, size_t to);
-
-
- runtime set
-
-single bit set.
-template <typename T>
-T set(T bits, size_t N);
-
-set range + set all
-template <typename T>
-T set(T bits, size_t from, size_t to);
-
-
- runtime clear
-
-clear a single bit.
-template <typename T>
-T clear(T bits, size_t N);
-
-range clear + clear all.
-template <typename T>
-T clear(T bits, size_t from, size_t to);
-
- runtime flip
-single bit flip.
-template <typename T>
-T flip(T bits, size_t N);
-
-range flip + flip all.
-template <typanem T>
-T flip(T bits, size_t from, size_t to);
 
+*) Update documentation for filler -> padding
+*) update documentation for bit_align -> align
+--------------------------------------------------------------------------------
 


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