|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62646 - sandbox/SOC/2010/bit_masks/boost/integer
From: bbartmanboost_at_[hidden]
Date: 2010-06-09 07:11:35
Author: bbartman
Date: 2010-06-09 07:11:35 EDT (Wed, 09 Jun 2010)
New Revision: 62646
URL: http://svn.boost.org/trac/boost/changeset/62646
Log:
Implemented a preventitive measure which prevents the user from providing something to the bitfield_tuple which is not a member or a storage
Text files modified:
sandbox/SOC/2010/bit_masks/boost/integer/bitfield_tuple.hpp | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 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-06-09 07:11:35 EDT (Wed, 09 Jun 2010)
@@ -51,7 +51,9 @@
typename FieldVector,
typename Offset
>
-struct bft_impl_ {
+struct bft_impl_;
+#if 0
+{
typedef Param param;
typedef FieldVector field_vector;
typedef StoragePolicy storage_policy;
@@ -69,7 +71,33 @@
>::type type;
};
};
+#endif
+
+/** Specialization over mpl::void_. */
+template < typename StoragePolicy,
+ typename FieldVector,
+ typename Offset
+>
+struct bft_impl_ <mpl::void_, StoragePolicy, FieldVector, Offset>{
+ typedef mpl::void_ param;
+ typedef FieldVector field_vector;
+ typedef StoragePolicy storage_policy;
+ typedef Offset offset;
+
+ typedef bft_impl_<param,storage_policy,field_vector,offset> type;
+
+ template <typename NextParam>
+ struct process {
+ typedef typename bft_impl_<
+ NextParam,
+ storage_policy,
+ field_vector,
+ offset
+ >::type type;
+ };
+};
+/** Specilization for storage type. */
template < typename StorageType,
typename AllocationPolicy,
typename StoragePolicy,
@@ -106,7 +134,7 @@
};
};
-
+/** Specilization for member. */
template < typename StoragePolicy,
typename FieldVector,
typename Offset,
@@ -167,7 +195,6 @@
typename T9 = mpl::void_
>
struct bitfield_tuple
- // : // public details::bft_impl_<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>
{
typedef typename details::bft_impl_<T0,
mpl::void_,
@@ -182,7 +209,7 @@
template process<T6>::type::
template process<T7>::type::
template process<T8>::type::
- template process<T9>::type processed_args;
+ template process<T9>::type processed_args;
};
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