Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62424 - sandbox/SOC/2010/bit_masks/lib/integer/doc
From: bbartmanboost_at_[hidden]
Date: 2010-06-04 07:41:43


Author: bbartman
Date: 2010-06-04 07:41:42 EDT (Fri, 04 Jun 2010)
New Revision: 62424
URL: http://svn.boost.org/trac/boost/changeset/62424

Log:
completed documentation for high_bits
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk | 15 ++++++++++++++-
   1 files changed, 14 insertions(+), 1 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/doc/high_bits.qbk 2010-06-04 07:41:42 EDT (Fri, 04 Jun 2010)
@@ -48,7 +48,20 @@
 
 Exaple:
 ``
- EXAMPLE
+typedef high_bits<int,4> mask;
+
+// binary for mask::value
+// 1111 0000 0000 0000 0000 0000 0000 0000
+
+int integral_value = 0xc000000c;
+
+// integral_value's binary value
+// 1100 0000 0000 0000 0000 0000 0000 1100
+
+int result = integral_value & mask();
+// binary value of result
+// 1100 0000 0000 0000 0000 0000 0000 0000
+
 ``
 
 The implicit cast operator allows for simplicity, clairity of code. In the


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