|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63141 - in sandbox/SOC/2010/bit_masks/boost/integer/details: . bft
From: bbartmanboost_at_[hidden]
Date: 2010-06-20 11:15:17
Author: bbartman
Date: 2010-06-20 11:15:14 EDT (Sun, 20 Jun 2010)
New Revision: 63141
URL: http://svn.boost.org/trac/boost/changeset/63141
Log:
removed the body of both storage and member because they are only used to move template parameters around.
Text files modified:
sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp | 16 ++++++++++------
sandbox/SOC/2010/bit_masks/boost/integer/details/bitfield_tuple_impl.hpp | 13 ++++---------
sandbox/SOC/2010/bit_masks/boost/integer/details/member.hpp | 13 +------------
sandbox/SOC/2010/bit_masks/boost/integer/details/storage.hpp | 9 +--------
4 files changed, 16 insertions(+), 35 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bft/arg_parse_impl.hpp 2010-06-20 11:15:14 EDT (Sun, 20 Jun 2010)
@@ -75,11 +75,11 @@
// make sure that the storage type is not specifed twice
BOOST_STATIC_ASSERT(( is_same<StoragePolicy,mpl::void_>::value ));
- typedef typename storage<
+ typedef storage<
StorageType
- >::type param;
+ > param;
typedef FieldVector field_vector;
- typedef param storage_policy;
+ typedef StorageType storage_policy;
typedef Offset offset;
typedef bft_arg_parse_impl<param,storage_policy,field_vector,offset> type;
@@ -98,7 +98,9 @@
/** Specilization for member.
* Documented and enforced preconditions
* 1. The user must not supply the same name for more then 1 parameter
- * (This may result in additional overhead during compile time ).
+ * (This may result in additional overhead during compile time ).
+ * 2. The Fieldwidth of a field must not be 0.
+ * 3. The Fieldwidth must not exceed the bit_width of the ReturnType.
*/
template < typename StoragePolicy,
typename FieldVector,
@@ -117,7 +119,9 @@
FieldVector,
Offset >
{
-
+ BOOST_STATIC_ASSERT(( FieldWidth != 0 ));
+ BOOST_STATIC_ASSERT(( FieldWidth <= bit_width<ReturnType>::value ));
+ // make sure that the name doesn't already exist.
BOOST_STATIC_ASSERT((
is_same<
typename mpl::find_if<
@@ -134,7 +138,7 @@
));
- typedef typename member< ReturnType, NameType, FieldWidth >::type param;
+ typedef member< ReturnType, NameType, FieldWidth > param;
typedef StoragePolicy storage_policy;
typedef typename mpl::push_back<
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/bitfield_tuple_impl.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/bitfield_tuple_impl.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/bitfield_tuple_impl.hpp 2010-06-20 11:15:14 EDT (Sun, 20 Jun 2010)
@@ -28,7 +28,7 @@
namespace boost { namespace details {
// The following preprocessor MACRO only used for writing clarity, it's only
-// used twice and then undef'ed before the end of this file.
+// used once and then undef'ed before the end of this file.
#define BOOST_BFT_ARG_PROCESSING \
details::bft_arg_parse_impl<\
T0, \
@@ -91,9 +91,7 @@
typename T8,
typename T9
>
-struct bitfield_tuple_base
- : BOOST_BFT_ARG_PROCESSING
-{
+struct bitfield_tuple_base {
typedef typename BOOST_BFT_ARG_PROCESSING processed_args;
@@ -101,7 +99,7 @@
// extracting te Arguments from processed_args relating to
// the storage policy. Also preforming static assertios
// where they can be done.
- typedef typename processed_args::storage_policy storage_policy;
+ typedef typename processed_args::storage_policy storage_type;
typedef typename processed_args::field_vector field_vector;
typedef typename processed_args::offset offset;
@@ -109,14 +107,11 @@
// A storage policy must be supplied.
BOOST_STATIC_ASSERT((
!is_same<
- storage_policy,
+ storage_type,
typename mpl::void_
>::value
));
- typedef typename storage_policy::storage_type storage_type;
-
-
// Precondition: storage_type must not be an array type.
// I always forget if the is_pod will match array types like int [3] or not.
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/member.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/member.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/member.hpp 2010-06-20 11:15:14 EDT (Sun, 20 Jun 2010)
@@ -22,20 +22,9 @@
* specifically to associate a group of parameters to gather within a type
* and make it easier for the data structure to figure out what to do with
* those parameter.
- *
- * Documented and enforced preconditions
- * The Fieldwidth of a field must not be 0.
- * The Fieldwidth must not exceed the bit_width of the ReturnType.
*/
template <typename ReturnType, typename Name, std::size_t FieldWidth>
-struct member {
- BOOST_STATIC_ASSERT(( FieldWidth != 0 ));
- BOOST_STATIC_ASSERT(( FieldWidth <= bit_width<ReturnType>::value ));
- typedef ReturnType return_type;
- typedef Name name_type;
- BOOST_STATIC_CONSTANT(std::size_t, field_width = FieldWidth);
- typedef member<ReturnType,Name,FieldWidth> type;
-};
+struct member;
Modified: sandbox/SOC/2010/bit_masks/boost/integer/details/storage.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/details/storage.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/details/storage.hpp 2010-06-20 11:15:14 EDT (Sun, 20 Jun 2010)
@@ -7,9 +7,6 @@
#ifndef BOOST_BIT_MASKS_TAGGED_HPP
#define BOOST_BIT_MASKS_TAGGED_HPP
-#include <memory>
-#include <boost/mpl/void.hpp>
-
namespace boost {
@@ -17,11 +14,7 @@
* around within the template parameters of a bitfield_tuple.
*/
template < typename StorageType>
-struct storage {
- typedef StorageType storage_type;
- typedef storage<StorageType> type;
-
-};
+struct storage;
} // end boost
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