Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62033 - sandbox/SOC/2010/bit_masks/boost/integer
From: bbartmanboost_at_[hidden]
Date: 2010-05-16 12:02:37


Author: bbartman
Date: 2010-05-16 12:02:36 EDT (Sun, 16 May 2010)
New Revision: 62033
URL: http://svn.boost.org/trac/boost/changeset/62033

Log:
working on refactoring a few things into bit masks.
Text files modified:
   sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp | 30 ++++++++++++++++++++++++++++++
   1 files changed, 30 insertions(+), 0 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp 2010-05-16 12:02:36 EDT (Sun, 16 May 2010)
@@ -0,0 +1,30 @@
+// (C) Copyright Brian Bartman 2010.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_INTEGRAL_MASK_HPP
+#define BOOST_INTEGRAL_MASK_HPP
+
+namespace boost {
+
+
+/** Integral Mask.
+ * This integral Mask is defined similar to an integral constant.
+ */
+template <typename T, T Value>
+struct integral_mask
+ :details::integral_mask_preconditions<T,Value>,
+ integral_constant<T, Value>
+{
+ typedef integral_mask<T,Value> type;
+
+ T operator()() {
+ return type::value;
+ }
+};
+
+} // namespace boost
+
+#endif


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