Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48773 - in branches/release: boost boost/config boost/detail boost/dynamic_bitset libs/dynamic_bitset tools/boostbook
From: gennaro.prota_at_[hidden]
Date: 2008-09-14 06:46:29


Author: gennaro_prota
Date: 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
New Revision: 48773
URL: http://svn.boost.org/trac/boost/changeset/48773

Log:
Ported *all* my trunk changes not yet merged so far, i.e. revisions 48251-48252,48280,48290,48350,48478,48496,48663-48664,48695,48729-48730; besides dynamic_bitset, these include fixes to setup_boostbook.sh and setup_boostbook.py, and changes to config/suffix.hpp [So: the affected "elements" are: a) the two setup_boostbook scripts, config/suffix.hpp and dynamic_bitset --note: yes, the list is exhaustive: all and only]
Text files modified:
   branches/release/boost/config/suffix.hpp | 54 +-
   branches/release/boost/detail/dynamic_bitset.hpp | 91 ++
   branches/release/boost/dynamic_bitset.hpp | 10
   branches/release/boost/dynamic_bitset/config.hpp | 14
   branches/release/boost/dynamic_bitset/dynamic_bitset.hpp | 194 ++++---
   branches/release/boost/dynamic_bitset_fwd.hpp | 12
   branches/release/libs/dynamic_bitset/bitset_test.hpp | 51 +
   branches/release/libs/dynamic_bitset/dyn_bitset_unit_tests1.cpp | 120 +++
   branches/release/libs/dynamic_bitset/dynamic_bitset.html | 981 +++++++++++++++++----------------------
   branches/release/tools/boostbook/setup_boostbook.py | 5
   branches/release/tools/boostbook/setup_boostbook.sh | 3
   11 files changed, 787 insertions(+), 748 deletions(-)

Modified: branches/release/boost/config/suffix.hpp
==============================================================================
--- branches/release/boost/config/suffix.hpp (original)
+++ branches/release/boost/config/suffix.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,21 +1,22 @@
 // Boost config.hpp configuration header file ------------------------------//
 
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Darin Adler 2001.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright Bill Kempf 2002.
-// (C) Copyright Jens Maurer 2002.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Gennaro Prota 2003.
-// (C) Copyright Eric Friedman 2003.
-// Use, modification and distribution are subject to 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)
+// Copyright (c) 2001-2003 John Maddock
+// Copyright (c) 2001 Darin Adler
+// Copyright (c) 2001 Peter Dimov
+// Copyright (c) 2002 Bill Kempf
+// Copyright (c) 2002 Jens Maurer
+// Copyright (c) 2002-2003 David Abrahams
+// Copyright (c) 2003 Gennaro Prota
+// Copyright (c) 2003 Eric Friedman
+//
+// 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 most recent version.
+// See http://www.boost.org/ for most recent version.
 
 // Boost config.hpp policy and rationale documentation has been moved to
-// http://www.boost.org/libs/config
+// http://www.boost.org/libs/config/
 //
 // This file is intended to be stable, and relatively unchanging.
 // It should contain boilerplate code only - no compiler specific
@@ -372,7 +373,7 @@
 // with
 // BOOST_USE_FACET(Type, loc);
 // Note do not add a std:: prefix to the front of BOOST_USE_FACET!
-// Use for BOOST_HAS_FACET is analagous.
+// Use for BOOST_HAS_FACET is analogous.
 
 #if defined(BOOST_NO_STD_USE_FACET)
 # ifdef BOOST_HAS_TWO_ARG_USE_FACET
@@ -453,12 +454,11 @@
 
 // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
 //
-// Some compilers have problems with function templates whose
-// template parameters don't appear in the function parameter
-// list (basically they just link one instantiation of the
-// template in the final executable). These macros provide a
-// uniform way to cope with the problem with no effects on the
-// calling syntax.
+// Some compilers have problems with function templates whose template
+// parameters don't appear in the function parameter list (basically
+// they just link one instantiation of the template in the final
+// executable). These macros provide a uniform way to cope with the
+// problem with no effects on the calling syntax.
 
 // Example:
 //
@@ -499,18 +499,18 @@
 # include "boost/type.hpp"
 # include "boost/non_type.hpp"
 
-# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
-# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
+# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
+# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
 
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
              , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
              , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
              , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
 
 #else

Modified: branches/release/boost/detail/dynamic_bitset.hpp
==============================================================================
--- branches/release/boost/detail/dynamic_bitset.hpp (original)
+++ branches/release/boost/detail/dynamic_bitset.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,7 +1,7 @@
-// --------------------------------------------------
+// -----------------------------------------------------------
 //
-// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
-// (C) Copyright Gennaro Prota 2003 - 2006.
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,14 +9,10 @@
 //
 // -----------------------------------------------------------
 
-// See http://www.boost.org/libs/dynamic_bitset/ for documentation.
-//
-// $Revision$ $Date$ - $Name$
-
 #ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
 #define BOOST_DETAIL_DYNAMIC_BITSET_HPP
 
-#include <cstddef> // for std::size_t
+#include <cstddef>
 #include "boost/config.hpp"
 #include "boost/detail/workaround.hpp"
 
@@ -24,6 +20,7 @@
 namespace boost {
 
   namespace detail {
+ namespace dynamic_bitset_impl {
 
     // Gives (read-)access to the object representation
     // of an object of type T (3.9p4). CANNOT be used
@@ -46,13 +43,30 @@
 
     // ------- count function implementation --------------
 
- namespace dynamic_bitset_count_impl {
-
     typedef unsigned char byte_type;
 
- enum mode { access_by_bytes, access_by_blocks };
+ // This two entities
+ //
+ // enum mode { access_by_bytes, access_by_blocks };
+ // template <mode> struct mode_to_type {};
+ //
+ // were removed, since the regression logs (as of 24 Aug 2008) show
+ // that several compilers have troubles with recognizing
+ //
+ // const mode m = access_by_bytes
+ //
+ // as a constant expression
+ //
+ // *We'll use a bool, instead *.
+ //
+ template <bool value>
+ struct value_to_type
+ {
+ value_to_type() {}
+ };
+ const bool access_by_bytes = true;
+ const bool access_by_blocks = false;
 
- template <mode> struct mode_to_type {};
 
     // the table: wrapped in a class template, so
     // that it is only instantiated if/when needed
@@ -87,7 +101,7 @@
      template <typename Iterator>
      inline std::size_t do_count(Iterator first, std::size_t length,
                                  int /*dummy param*/,
- mode_to_type<access_by_bytes>* )
+ value_to_type<access_by_bytes>* )
      {
          std::size_t num = 0;
          if (length)
@@ -111,7 +125,7 @@
      //
      template <typename Iterator, typename ValueType>
      inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
- mode_to_type<access_by_blocks>*)
+ value_to_type<access_by_blocks>*)
      {
          std::size_t num = 0;
          while (length){
@@ -129,8 +143,6 @@
          return num;
      }
 
-
- } // dynamic_bitset_count_impl
     // -------------------------------------------------------
 
 
@@ -139,7 +151,7 @@
     //
     // size_type(-1) / sizeof(T)
     //
- // from vector<>::max_size. This tries to get out more
+ // from vector<>::max_size. This tries to get more
     // meaningful info.
     //
     template <typename T>
@@ -158,16 +170,57 @@
 
     // for static_asserts
     template <typename T>
- struct dynamic_bitset_allowed_block_type {
+ struct allowed_block_type {
         enum { value = T(-1) > 0 }; // ensure T has no sign
     };
 
     template <>
- struct dynamic_bitset_allowed_block_type<bool> {
+ struct allowed_block_type<bool> {
         enum { value = false };
     };
 
 
+ template <typename T>
+ struct is_numeric {
+ enum { value = false };
+ };
+
+# define BOOST_dynamic_bitset_is_numeric(x) \
+ template<> \
+ struct is_numeric< x > { \
+ enum { value = true }; \
+ } /**/
+
+ BOOST_dynamic_bitset_is_numeric(bool);
+ BOOST_dynamic_bitset_is_numeric(char);
+
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ BOOST_dynamic_bitset_is_numeric(wchar_t);
+#endif
+
+ BOOST_dynamic_bitset_is_numeric(signed char);
+ BOOST_dynamic_bitset_is_numeric(short int);
+ BOOST_dynamic_bitset_is_numeric(int);
+ BOOST_dynamic_bitset_is_numeric(long int);
+
+ BOOST_dynamic_bitset_is_numeric(unsigned char);
+ BOOST_dynamic_bitset_is_numeric(unsigned short);
+ BOOST_dynamic_bitset_is_numeric(unsigned int);
+ BOOST_dynamic_bitset_is_numeric(unsigned long);
+
+#if defined(BOOST_HAS_LONG_LONG)
+ BOOST_dynamic_bitset_is_numeric(::boost::long_long_type);
+ BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type);
+#endif
+
+ // intentionally omitted
+ //BOOST_dynamic_bitset_is_numeric(float);
+ //BOOST_dynamic_bitset_is_numeric(double);
+ //BOOST_dynamic_bitset_is_numeric(long double);
+
+#undef BOOST_dynamic_bitset_is_numeric
+
+ } // dynamic_bitset_impl
   } // namespace detail
 
 } // namespace boost

Modified: branches/release/boost/dynamic_bitset.hpp
==============================================================================
--- branches/release/boost/dynamic_bitset.hpp (original)
+++ branches/release/boost/dynamic_bitset.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,7 +1,7 @@
-// --------------------------------------------------
+// -----------------------------------------------------------
 //
-// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
-// (C) Copyright Gennaro Prota 2003 - 2004.
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2004, 2008 Gennaro Prota
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,10 +9,6 @@
 //
 // -----------------------------------------------------------
 
-// See http://www.boost.org/libs/dynamic_bitset/ for documentation.
-//
-// $Revision$ $Date$ - $Name$
-
 #ifndef BOOST_DYNAMIC_BITSET_HPP
 #define BOOST_DYNAMIC_BITSET_HPP
 

Modified: branches/release/boost/dynamic_bitset/config.hpp
==============================================================================
--- branches/release/boost/dynamic_bitset/config.hpp (original)
+++ branches/release/boost/dynamic_bitset/config.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,7 +1,7 @@
-// --------------------------------------------------
+// -----------------------------------------------------------
 //
-// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
-// (C) Copyright Gennaro Prota 2003 - 2006.
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,10 +9,6 @@
 //
 // -----------------------------------------------------------
 
-// See http://www.boost.org/libs/dynamic_bitset/ for documentation.
-//
-// $Revision$ $Date$ - $Name$
-
 #ifndef BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
 #define BOOST_DYNAMIC_BITSET_CONFIG_HPP_GP_20040424
 
@@ -26,8 +22,8 @@
 
 // this should be in the config system some day
 // see http://lists.boost.org/MailArchives/boost/msg62291.php
-#define BOOST_DYNAMIC_BITSET_GNUC_VERSION ( __GNUC__ * 100 * 100 \
- + __GNUC_MINOR__ * 100)
+#define BOOST_DYNAMIC_BITSET_GNUC_VERSION ( (__GNUC__) * 100 * 100 \
+ + (__GNUC_MINOR__) * 100)
 
 // no-op function to workaround gcc bug c++/8419
 //

Modified: branches/release/boost/dynamic_bitset/dynamic_bitset.hpp
==============================================================================
--- branches/release/boost/dynamic_bitset/dynamic_bitset.hpp (original)
+++ branches/release/boost/dynamic_bitset/dynamic_bitset.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,7 +1,7 @@
-// --------------------------------------------------
+// -----------------------------------------------------------
 //
-// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
-// (C) Copyright Gennaro Prota 2003 - 2006.
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,18 +9,13 @@
 //
 // -----------------------------------------------------------
 
-// See http://www.boost.org/libs/dynamic_bitset/ for documentation.
-//
-// $Revision$ $Date$ - $Name$
-
-
 #ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
 #define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
 
 #include <assert.h>
 #include <string>
-#include <stdexcept> // for std::overflow_error
-#include <algorithm> // for std::swap, min, copy, fill
+#include <stdexcept>
+#include <algorithm>
 #include <vector>
 #include <climits> // for CHAR_BIT
 
@@ -43,7 +38,7 @@
 #include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter)
 #include "boost/static_assert.hpp"
 #include "boost/limits.hpp"
-#include "boost/pending/lowest_bit.hpp" // used by find_first/next
+#include "boost/pending/lowest_bit.hpp"
 
 
 namespace boost {
@@ -63,13 +58,13 @@
   // this class definition to avoid problems with VC++. Similarly,
   // with the member functions of nested classes.
 
- BOOST_STATIC_ASSERT(detail::dynamic_bitset_allowed_block_type<Block>::value);
+ BOOST_STATIC_ASSERT(detail::dynamic_bitset_impl::allowed_block_type<Block>::value);
 
 public:
     typedef Block block_type;
     typedef Allocator allocator_type;
     typedef std::size_t size_type;
- typedef int block_width_type;
+ typedef block_type block_width_type;
 
     BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits<Block>::digits));
     BOOST_STATIC_CONSTANT(size_type, npos = static_cast<size_type>(-1));
@@ -85,9 +80,12 @@
 
 
         // the one and only non-copy ctor
- reference(block_type & b, int pos)
- :m_block(b), m_mask(block_type(1) << pos)
- { assert(pos >= 0 && pos < bits_per_block); }
+ reference(block_type & b, block_type pos)
+ :m_block(b),
+ m_mask( (assert(pos < bits_per_block),
+ block_type(1) << pos )
+ )
+ { }
 
         void operator&(); // left undefined
 
@@ -171,10 +169,39 @@
     dynamic_bitset(BlockInputIterator first, BlockInputIterator last,
                    const Allocator& alloc = Allocator())
 
- :m_bits(first, last, alloc),
- m_num_bits(m_bits.size() * bits_per_block)
- {}
+ :m_bits(alloc),
+ m_num_bits(0)
+ {
+ using boost::detail::dynamic_bitset_impl::value_to_type;
+ using boost::detail::dynamic_bitset_impl::is_numeric;
+
+ const value_to_type<
+ is_numeric<BlockInputIterator>::value> selector;
+
+ dispatch_init(first, last, selector);
+ }
+
+ template <typename T>
+ void dispatch_init(T num_bits, unsigned long value,
+ detail::dynamic_bitset_impl::value_to_type<true>)
+ {
+ init_from_unsigned_long(static_cast<size_type>(num_bits), value);
+ }
+
+ template <typename T>
+ void dispatch_init(T first, T last,
+ detail::dynamic_bitset_impl::value_to_type<false>)
+ {
+ init_from_block_range(first, last);
+ }
 
+ template <typename BlockIter>
+ void init_from_block_range(BlockIter first, BlockIter last)
+ {
+ assert(m_bits.size() == 0);
+ m_bits.insert(m_bits.end(), first, last);
+ m_num_bits = m_bits.size() * bits_per_block;
+ }
 
     // copy constructor
     dynamic_bitset(const dynamic_bitset& b);
@@ -316,7 +343,7 @@
 
     block_width_type count_extra_bits() const { return bit_index(size()); }
     static size_type block_index(size_type pos) { return pos / bits_per_block; }
- static block_width_type bit_index(size_type pos) { return static_cast<int>(pos % bits_per_block); }
+ static block_width_type bit_index(size_type pos) { return static_cast<block_width_type>(pos % bits_per_block); }
     static Block bit_mask(size_type pos) { return Block(1) << bit_index(pos); }
 
     template <typename CharT, typename Traits, typename Alloc>
@@ -355,6 +382,39 @@
 
     }
 
+ void init_from_unsigned_long(size_type num_bits,
+ unsigned long value/*,
+ const Allocator& alloc*/)
+ {
+
+ assert(m_bits.size() == 0);
+
+ m_bits.resize(calc_num_blocks(num_bits));
+ m_num_bits = num_bits;
+
+ typedef unsigned long num_type;
+ typedef boost::detail::dynamic_bitset_impl
+ ::shifter<num_type, bits_per_block, ulong_width> shifter;
+
+ //if (num_bits == 0)
+ // return;
+
+ // zero out all bits at pos >= num_bits, if any;
+ // note that: num_bits == 0 implies value == 0
+ if (num_bits < static_cast<size_type>(ulong_width)) {
+ const num_type mask = (num_type(1) << num_bits) - 1;
+ value &= mask;
+ }
+
+ typename buffer_type::iterator it = m_bits.begin();
+ for( ; value; shifter::left_shift(value), ++it) {
+ *it = static_cast<block_type>(value);
+ }
+
+ }
+
+
+
 BOOST_DYNAMIC_BITSET_PRIVATE:
 
     bool m_unchecked_test(size_type pos) const;
@@ -383,6 +443,11 @@
       size_type n;
       Block mask;
       Block * current;
+
+ // not implemented
+ bit_appender(const bit_appender &);
+ bit_appender & operator=(const bit_appender &);
+
     public:
         bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {}
         ~bit_appender() {
@@ -422,7 +487,7 @@
 //
 // NOTE:
 // The compiler is actually right, until core issue 454 will be settled:
-// http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#454
+// <http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#454>
 //
 // It's arguable whether we want to mark this with BOOST_WORKAROUND or not.
 
@@ -539,28 +604,10 @@
 template <typename Block, typename Allocator>
 dynamic_bitset<Block, Allocator>::
 dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc)
- : m_bits(calc_num_blocks(num_bits), Block(0), alloc),
- m_num_bits(num_bits)
+ : m_bits(alloc),
+ m_num_bits(0)
 {
-
- typedef unsigned long num_type;
- typedef boost::detail::shifter<num_type, bits_per_block, ulong_width> shifter;
-
- //if (num_bits == 0)
- // return;
-
- // zero out all bits at pos >= num_bits, if any;
- // note that: num_bits == 0 implies value == 0
- if (num_bits < static_cast<size_type>(ulong_width)) {
- const num_type mask = (num_type(1) << num_bits) - 1;
- value &= mask;
- }
-
- typename buffer_type::iterator it = m_bits.begin();
- for( ; value; shifter::left_shift(value), ++it) {
- *it = static_cast<block_type>(value);
- }
-
+ init_from_unsigned_long(num_bits, value);
 }
 
 // copy constructor
@@ -769,27 +816,12 @@
             b[div] = b[0];
         }
 
- // disable std::fill_n deprecated warning in MSVC++ 8.0 (warning C4996)
- // This will only work in MSVC++ 8.0 SP1, which brings up the warning
- // in the line of user code; otherwise, the warning will come up
- // in the line in the header itself, so if the user includes stdlib
- // headers before dynamic_bitset, he will still get the warning.
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#pragma warning(push)
-#pragma warning(disable:4996)
-#endif
-
         // zero out div blocks at the less significant end
         std::fill_n(b, div, static_cast<block_type>(0));
 
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#pragma warning(pop)
-#endif
-
         // zero out any 1 bit that flowed into the unused part
         m_zero_unused_bits(); // thanks to Lester Gong
 
-
     }
 
     return *this;
@@ -968,21 +1000,29 @@
     return b;
 }
 
-
 template <typename Block, typename Allocator>
 typename dynamic_bitset<Block, Allocator>::size_type
 dynamic_bitset<Block, Allocator>::count() const
 {
- using namespace detail::dynamic_bitset_count_impl;
+ using detail::dynamic_bitset_impl::table_width;
+ using detail::dynamic_bitset_impl::access_by_bytes;
+ using detail::dynamic_bitset_impl::access_by_blocks;
+ using detail::dynamic_bitset_impl::value_to_type;
+
+ // NOTE: Explicitly qualifying "bits_per_block" to workaround
+ // regressions of gcc 3.4.x
+ const bool no_padding =
+ dynamic_bitset<Block, Allocator>::bits_per_block
+ == CHAR_BIT * sizeof(Block);
 
- const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block);
     const bool enough_table_width = table_width >= CHAR_BIT;
 
- typedef mode_to_type< (no_padding && enough_table_width ?
- access_by_bytes : access_by_blocks) > m;
-
- return do_count(m_bits.begin(), num_blocks(), Block(0), static_cast<m*>(0));
+ const bool mode = (no_padding && enough_table_width)
+ ? access_by_bytes
+ : access_by_blocks;
 
+ return do_count(m_bits.begin(), num_blocks(), Block(0),
+ static_cast<value_to_type<mode> *>(0));
 }
 
 
@@ -1072,29 +1112,22 @@
   // beyond the "allowed" positions
   typedef unsigned long result_type;
 
- /*
- if find_next() did its job correctly we don't need the if
- below, because all bits we care about are in the first block
-
- if (bits_per_block >= ulong_width)
- return static_cast<result_type>(m_bits[0]);
- */
+ const size_type max_size =
+ (std::min)(m_num_bits, static_cast<size_type>(ulong_width));
 
- size_type last_block = block_index(
- (std::min)( m_num_bits, (size_type)ulong_width ) - 1 );
- result_type result = 0;
- for (size_type i = 0; i <= last_block; ++i) {
+ const size_type last_block = block_index( max_size - 1 );
 
- assert((size_type)bits_per_block * i < (size_type)ulong_width);
+ assert((last_block * bits_per_block) < static_cast<size_type>(ulong_width));
 
- unsigned long piece = m_bits[i];
- result |= (piece << (bits_per_block * i));
+ result_type result = 0;
+ for (size_type i = 0; i <= last_block; ++i) {
+ const size_type offset = i * bits_per_block;
+ result |= (static_cast<result_type>(m_bits[i]) << offset);
   }
 
   return result;
 }
 
-
 template <typename Block, typename Allocator>
 inline typename dynamic_bitset<Block, Allocator>::size_type
 dynamic_bitset<Block, Allocator>::size() const
@@ -1123,7 +1156,8 @@
     // his own allocator.
     //
 
- const size_type m = detail::vector_max_size_workaround(m_bits);
+ const size_type m = detail::dynamic_bitset_impl::
+ vector_max_size_workaround(m_bits);
 
     return m <= (size_type(-1)/bits_per_block) ?
         m * bits_per_block :

Modified: branches/release/boost/dynamic_bitset_fwd.hpp
==============================================================================
--- branches/release/boost/dynamic_bitset_fwd.hpp (original)
+++ branches/release/boost/dynamic_bitset_fwd.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,7 +1,7 @@
-// --------------------------------------------------
+// -----------------------------------------------------------
 //
-// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002.
-// (C) Copyright Gennaro Prota 2003 - 2004.
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2004 Gennaro Prota
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -9,10 +9,6 @@
 //
 // -----------------------------------------------------------
 
-// See http://www.boost.org/libs/dynamic_bitset/ for documentation.
-//
-// $Revision$ $Date$ - $Name$
-
 #ifndef BOOST_DYNAMIC_BITSET_FWD_HPP
 #define BOOST_DYNAMIC_BITSET_FWD_HPP
 
@@ -24,6 +20,6 @@
           typename Allocator = std::allocator<Block> >
 class dynamic_bitset;
 
-} // namespace boost
+}
 
 #endif // include guard

Modified: branches/release/libs/dynamic_bitset/bitset_test.hpp
==============================================================================
--- branches/release/libs/dynamic_bitset/bitset_test.hpp (original)
+++ branches/release/libs/dynamic_bitset/bitset_test.hpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,14 +1,12 @@
-// --------------------------------------------------
-// (C) Copyright Jeremy Siek 2001.
-// (C) Copyright Gennaro Prota 2003 - 2006.
+// -----------------------------------------------------------
+// Copyright (c) 2001 Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
 //
 // 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)
 //
 // -----------------------------------------------------------
-//
-// $Id$
 
 #ifndef BOOST_BITSET_TEST_HPP_GP_20040319
 #define BOOST_BITSET_TEST_HPP_GP_20040319
@@ -110,32 +108,43 @@
 // constructors
 // default (can't do this generically)
 
-// from unsigned long
-
 template <typename Bitset>
 struct bitset_test {
 
   typedef typename Bitset::block_type Block;
   BOOST_STATIC_CONSTANT(int, bits_per_block = Bitset::bits_per_block);
 
-
- static void from_unsigned_long(std::size_t sz, unsigned long num)
+ // from unsigned long
+ //
+ // Note: this is templatized so that we check that the do-the-right-thing
+ // constructor dispatch is working correctly.
+ //
+ template <typename NumBits, typename Value>
+ static void from_unsigned_long(NumBits num_bits, Value num)
   {
- // An object of size N = sz is constructed:
- // - the first M bit positions are initialized to the corresponding bit
- // values in num (M being the smaller of N and the width of unsigned
- // long)
+ // An object of size sz = num_bits is constructed:
+ // - the first m bit positions are initialized to the corresponding
+ // bit values in num (m being the smaller of sz and ulong_width)
     //
- // - if M < N remaining bit positions are initialized to zero
+ // - any remaining bit positions are initialized to zero
+ //
+
+ Bitset b(num_bits, num);
+
+ // OK, we can now cast to size_type
+ typedef typename Bitset::size_type size_type;
+ const size_type sz = static_cast<size_type>(num_bits);
 
- Bitset b(sz, num);
     BOOST_CHECK(b.size() == sz);
 
     const std::size_t ulong_width = std::numeric_limits<unsigned long>::digits;
- std::size_t m = (std::min)(sz, ulong_width);
- std::size_t i;
- for (i = 0; i < m; ++i)
- BOOST_CHECK(b.test(i) == nth_bit(num, i));
+ size_type m = sz;
+ if (ulong_width < sz)
+ m = ulong_width;
+
+ size_type i = 0;
+ for ( ; i < m; ++i)
+ BOOST_CHECK(b.test(i) == nth_bit(static_cast<unsigned long>(num), i));
     for ( ; i < sz; ++i)
       BOOST_CHECK(b.test(i) == 0);
   }
@@ -980,7 +989,7 @@
   //-------------------------------------------------------------------------
 
   // operator<<( [basic_]ostream,
- template<typename Stream>
+ template <typename Stream>
   static void stream_inserter(const Bitset & b,
                               Stream & s,
                               const char * file_name
@@ -1060,7 +1069,7 @@
   }
 
   // operator>>( [basic_]istream
- template<typename Stream, typename String>
+ template <typename Stream, typename String>
   static void stream_extractor(Bitset& b,
                                Stream& is,
                                String& str

Modified: branches/release/libs/dynamic_bitset/dyn_bitset_unit_tests1.cpp
==============================================================================
--- branches/release/libs/dynamic_bitset/dyn_bitset_unit_tests1.cpp (original)
+++ branches/release/libs/dynamic_bitset/dyn_bitset_unit_tests1.cpp 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,14 +1,12 @@
-// --------------------------------------------------------
-// (C) Copyright Jeremy Siek 2001.
-// (C) Copyright Gennaro Prota 2003 - 2006.
+// -----------------------------------------------------------
+// Copyright (c) 2001 Jeremy Siek
+// Copyright (c) 2003-2006 Gennaro Prota
 //
 // 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)
 //
 // -----------------------------------------------------------
-//
-// $Id$
 
 #include "bitset_test.hpp"
 #include "boost/dynamic_bitset/dynamic_bitset.hpp"
@@ -17,7 +15,7 @@
 
 #include "boost/detail/workaround.hpp"
 
-#define BOOST_BITSET_TEST_COUNT_OF(x) (sizeof(x)/sizeof(x[0]))
+#define BOOST_BITSET_TEST_COUNT(x) (sizeof(x)/sizeof(x[0]))
 
 
 // Codewarrior 8.3 for Win fails without this.
@@ -56,6 +54,56 @@
 
 }
 
+// tests the do-the-right-thing constructor dispatch
+template <typename Tests, typename T>
+void run_numeric_ctor_tests( BOOST_EXPLICIT_TEMPLATE_TYPE(Tests)
+ BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T) )
+{
+
+ const int bits_per_block = Tests::bits_per_block;
+ const int width = std::numeric_limits<T>::digits;
+ const T ma = (std::numeric_limits<T>::max)();
+ const T mi = (std::numeric_limits<T>::min)();
+
+ int sizes[] = {
+ 0, 7*width/10, width, 13*width/10, 3*width,
+ 7*bits_per_block/10, bits_per_block, 13*bits_per_block/10, 3*bits_per_block
+ };
+
+ const T numbers[] = {
+ T(-1), T(-3), T(-8), T(-15), mi/2, mi,
+ 0, 1, 3, 8, 15, ma/2, ma
+ };
+
+ for (std::size_t s = 0; s < BOOST_BITSET_TEST_COUNT(sizes); ++s) {
+ for (std::size_t n = 0; n < BOOST_BITSET_TEST_COUNT(numbers); ++n ) {
+
+ // can match ctor from ulong or templated one
+ Tests::from_unsigned_long(sizes[s], numbers[n]);
+
+ typedef std::size_t compare_type;
+ const compare_type sz = sizes[s];
+ // this condition is to be sure that size is representable in T, so
+ // that for signed T's we avoid implementation-defined behavior [if ma
+ // is larger than what std::size_t can hold then this is ok for our
+ // purposes: our sizes are anyhow < max(size_t)], which in turn could
+ // make the first argument of from_unsigned_long() a small negative,
+ // later converted to a very large unsigned. Example: signed 8-bit
+ // char (CHAR_MAX=127), bits_per_block=64, sz = 192 > 127.
+ const bool fits =
+ sz <= static_cast<compare_type>(ma);
+
+ if (fits) {
+ // can match templated ctor only (so we test dispatching)
+ Tests::from_unsigned_long(static_cast<T>(sizes[s]), numbers[n]);
+ }
+
+ }
+ }
+
+}
+
+
 template <typename Block>
 void run_test_cases( BOOST_EXPLICIT_TEMPLATE_TYPE(Block) )
 {
@@ -69,24 +117,52 @@
   //=====================================================================
   // Test construction from unsigned long
   {
- typedef unsigned long source_type;
- const std::size_t source_width = std::numeric_limits<source_type>::digits;
- const source_type source_max =(std::numeric_limits<source_type>::max)();
-
- source_type numbers[] = { 0, 1, 40247, source_max >> 1, source_max };
- std::size_t sizes[] =
- { 0, 7 * source_width / 10, source_width, 13 * source_width / 10,
- 7 * bits_per_block / 10, bits_per_block, 13 * bits_per_block / 10,
- 3 * bits_per_block };
-
- const std::size_t value_count = BOOST_BITSET_TEST_COUNT_OF(numbers);
- const std::size_t size_count = BOOST_BITSET_TEST_COUNT_OF(sizes);
-
- for (std::size_t v = 0; v < value_count; ++v) {
- for (std::size_t s = 0; s < size_count; ++s) {
- Tests::from_unsigned_long(sizes[s], numbers[v]);
+ typedef typename bitset_type::size_type size_type;
+
+
+ // NOTE:
+ //
+ // 1. keep this in sync with the numeric types supported
+ // for constructor dispatch (of course)
+ // 2. bool is tested separately; ugly and inelegant, but
+ // we don't have much time to think of a better solution
+ // which is likely to work on broken compilers
+ //
+ const int sizes[] = {
+ 0, 1, 3,
+ 7*bits_per_block/10, bits_per_block, 13*bits_per_block/10, 3*bits_per_block
+ };
+
+ const bool values[] = { false, true };
+
+ for (std::size_t s = 0; s < BOOST_BITSET_TEST_COUNT(sizes); ++s) {
+ for (std::size_t v = 0; v < BOOST_BITSET_TEST_COUNT(values); ++v) {
+ Tests::from_unsigned_long(sizes[s], values[v]);
+ Tests::from_unsigned_long(sizes[s] != 0, values[v]);
       }
     }
+
+ run_numeric_ctor_tests<Tests, char>();
+
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ run_numeric_ctor_tests<Tests, wchar_t>();
+#endif
+
+ run_numeric_ctor_tests<Tests, signed char>();
+ run_numeric_ctor_tests<Tests, short int>();
+ run_numeric_ctor_tests<Tests, int>();
+ run_numeric_ctor_tests<Tests, long int>();
+
+ run_numeric_ctor_tests<Tests, unsigned char>();
+ run_numeric_ctor_tests<Tests, unsigned short>();
+ run_numeric_ctor_tests<Tests, unsigned int>();
+ run_numeric_ctor_tests<Tests, unsigned long>();
+
+#if defined(BOOST_HAS_LONG_LONG)
+ run_numeric_ctor_tests<Tests, ::boost::long_long_type>();
+ run_numeric_ctor_tests<Tests, ::boost::ulong_long_type>();
+#endif
+
   }
   //=====================================================================
   // Test construction from a string

Modified: branches/release/libs/dynamic_bitset/dynamic_bitset.html
==============================================================================
--- branches/release/libs/dynamic_bitset/dynamic_bitset.html (original)
+++ branches/release/libs/dynamic_bitset/dynamic_bitset.html 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -1,14 +1,16 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
 
 <!--
- (C) Jeremy Siek 2001.
- (C) Gennaro Prota 2003-2004.
+ Copyright (c) 2001 Jeremy Siek
+ Copyright (c) 2003-2004, 2008 Gennaro Prota
 
        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)
- -->
+-->
 
 <!--
    Copyright (c) 1996-1999
@@ -36,64 +38,46 @@
   -->
 <head>
 <title>dynamic_bitset&lt;Block, Allocator&gt;</title>
+<link rel="stylesheet" type="text/css" href="../../rst.css" />
 </head>
-<body text="#000000" link="#006600" alink="#003300"
- vlink="#7C7F87" bgcolor="#FFFFFF">
-<img src="../../boost.png" alt="boost.png (6897 bytes)"
-align="middle" width="277" height="86">
 
-<p><!--end header-->
-<br>
-</p>
+<body>
+<div id="body">
+<div id="body-inner">
+<div id="content">
+<div class="section" id="docs">
+<div class="section-0">
+<div class="section-body">
 
+<div id="boost-logo"><img src="../../boost.png" alt="Boost C++ Libraries" /></div>
 <h1>dynamic_bitset&lt;Block, Allocator&gt;</h1>
-
 <h2>Contents</h2>
 
 <dl class="index">
 <dt>Description</dt>
-
 <dt>Synopsis</dt>
-
 <dt>Definitions</dt>
-
 <dt>Examples</dt>
-
 <dt>Rationale</dt>
-
 <dt>Header Files</dt>
-
 <dt>Template Parameters</dt>
-
 <dt>Concepts modeled</dt>
 
 <dt>Type requirements</dt>
-
 <dt>Public base classes</dt>
-
 <dt>Nested type names</dt>
-
 <dt>Public data members</dt>
-
 <dt>Constructors</dt>
-
 <dt>Destructor</dt>
-
 <dt>Member functions</dt>
-
 <dt>Non-member functions</dt>
-
 <dt>Exception guarantees</dt>
 
 <dt>Changes from previous version(s)</dt>
-
 <dt>See also</dt>
-
 <dt>Acknowledgements</dt>
 </dl>
-
-<h3><a name="description">Description</a></h3>
-
+<h3><a id="description">Description</a></h3>
 <p>The <tt>dynamic_bitset</tt> class represents a set of bits. It
 provides accesses to the value of individual bits via an
 <tt>operator[]</tt> and provides all of the bitwise operators
@@ -118,9 +102,7 @@
 <tt>dynamic_bitset</tt>, such as <tt>operator&amp;</tt> and
 <tt>operator|</tt>, correspond to set operations, such as
 intersection and union.</p>
-
-<h3><a name="synopsis">Synopsis</a></h3>
-
+<h3><a id ="synopsis">Synopsis</a></h3>
 <pre>
 namespace boost {
 
@@ -140,6 +122,7 @@
     class reference
     {
         void operator&amp;(); // not defined
+
     public:
         // An automatically generated copy constructor.
 
@@ -155,6 +138,7 @@
         operator bool() const;
         reference&amp; flip();
     };
+
     typedef bool const_reference;
 
     explicit <a href=
@@ -191,29 +175,20 @@
     void clear();
     void push_back(bool bit);
     void append(Block block);
+
     template &lt;typename BlockInputIterator&gt;
- void <a href=
-"#append2">append</a>(BlockInputIterator first, BlockInputIterator last);
+ void append(BlockInputIterator first, BlockInputIterator last);
 
- dynamic_bitset&amp; <a href=
-"#op-and-assign">operator&amp;=</a>(const dynamic_bitset&amp; b);
- dynamic_bitset&amp; <a href=
-"#op-or-assign">operator|=</a>(const dynamic_bitset&amp; b);
- dynamic_bitset&amp; <a href=
-"#op-xor-assign">operator^=</a>(const dynamic_bitset&amp; b);
- dynamic_bitset&amp; <a href=
-"#op-sub-assign">operator-=</a>(const dynamic_bitset&amp; b);
- dynamic_bitset&amp; <a href=
-"#op-sl-assign">operator&lt;&lt;=</a>(size_type n);
- dynamic_bitset&amp; <a href=
-"#op-sr-assign">operator&gt;&gt;=</a>(size_type n);
- dynamic_bitset <a href=
-"#op-sl">operator&lt;&lt;</a>(size_type n) const;
- dynamic_bitset <a href=
-"#op-sr">operator&gt;&gt;</a>(size_type n) const;
+ dynamic_bitset&amp; operator&=(const dynamic_bitset&amp; b);
+ dynamic_bitset&amp; operator|=(const dynamic_bitset&amp; b);
+ dynamic_bitset&amp; operator^=(const dynamic_bitset&amp; b);
+ dynamic_bitset&amp; operator-=(const dynamic_bitset&amp; b);
+ dynamic_bitset&amp; operator<<=(size_type n);
+ dynamic_bitset&amp; operator>>=(size_type n);
+ dynamic_bitset operator<<(size_type n) const;
+ dynamic_bitset operator>>(size_type n) const;
 
- dynamic_bitset&amp; <a href=
-"#set2">set</a>(size_type n, bool val = true);
+ dynamic_bitset&amp; set(size_type n, bool val = true);
     dynamic_bitset&amp; set();
     dynamic_bitset&amp; reset(size_type n);
     dynamic_bitset&amp; reset();
@@ -225,10 +200,8 @@
     dynamic_bitset operator~() const;
     size_type count() const;
 
- reference <a href=
-"#bracket">operator[]</a>(size_type pos);
- bool <a href=
-"#const-bracket">operator[]</a>(size_type pos) const;
+ reference operator[](size_type pos);
+ bool operator[](size_type pos) const;
 
     unsigned long to_ulong() const;
 
@@ -237,18 +210,15 @@
     size_type max_size() const;
     bool empty() const;
 
- bool <a href=
-"#is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const;
- bool <a href=
-"#is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const;
+ bool is_subset_of(const dynamic_bitset&amp; a) const;
+ bool is_proper_subset_of(const dynamic_bitset&amp; a) const;
 
     size_type find_first() const;
     size_type find_next(size_type pos) const;
 
-
-
 };
 
+
 template &lt;typename B, typename A&gt;
 bool <a href=
 "#op-equal">operator==</a>(const dynamic_bitset&lt;B, A&gt;&amp; a, const dynamic_bitset&lt;B, A&gt;&amp; b);
@@ -316,7 +286,7 @@
 } // namespace boost
 </pre>
 
-<h3><a name="definitions">Definitions</a></h3>
+<h3><a id="definitions">Definitions</a></h3>
 
 <p>Each bit represents either the Boolean value true or false (1
 or 0). To <i>set</i> a bit is to assign it 1. To <i>clear</i> or
@@ -331,135 +301,31 @@
 unsigned long <tt>n</tt>, the bit at position <tt>i</tt> of the
 bitset has the same value as <tt>(n &gt;&gt; i) &amp; 1</tt>.</p>
 
-<h3><a name="examples">Examples</a></h3>
-
-<p>An example of setting and reading some bits. Note that
-<tt>operator[]</tt> goes from the least-significant bit at
-<tt>0</tt> to the most significant bit at <tt>size()-1</tt>. The
-<tt>operator&lt;&lt;</tt> for <tt>dynamic_bitset</tt> prints the
-bitset from most-significant to least-significant, since that is
-the format most people are use to reading.</p>
-
-<blockquote>
-<pre>
-#include &lt;iostream&gt;
-#include &lt;boost/dynamic_bitset.hpp&gt;
-int main(int, char*[]) {
- boost::dynamic_bitset&lt;&gt; x(5); // all 0's by default
- x[0] = 1;
- x[1] = 1;
- x[4] = 1;
- for (boost::dynamic_bitset&lt;&gt;::size_type i = 0; i &lt; x.size(); ++i)
- std::cout &lt;&lt; x[i];
- std::cout &lt;&lt; "\n";
- std::cout &lt;&lt; x &lt;&lt; "\n";
- return EXIT_SUCCESS;
-}
-</pre>
-</blockquote>
-
-<p>The output is</p>
-
-<blockquote>
-<pre>
-11001
-10011
-</pre>
-</blockquote>
-
-<p>An example of creating some bitsets from integers (unsigned
-longs).</p>
-
-<blockquote>
-<pre>
-#include &lt;iostream&gt;
-#include &lt;boost/dynamic_bitset.hpp&gt;
-int main(int, char*[])
-{
- const boost::dynamic_bitset&lt;&gt; b0(2, 0ul);
- std::cout &lt;&lt; "bits(0) = " &lt;&lt; b0 &lt;&lt; std::endl;
-
- const boost::dynamic_bitset&lt;&gt; b1(2, 1ul);
- std::cout &lt;&lt; "bits(1) = " &lt;&lt; b1 &lt;&lt; std::endl;
-
- const boost::dynamic_bitset&lt;&gt; b2(2, 2ul);
- std::cout &lt;&lt; "bits(2) = " &lt;&lt; b2 &lt;&lt; std::endl;
-
- const boost::dynamic_bitset&lt;&gt; b3(2, 3ul);
- std::cout &lt;&lt; "bits(3) = " &lt;&lt; b3 &lt;&lt; std::endl;
-
- return EXIT_SUCCESS;
-}
-</pre>
-</blockquote>
-
-<p>The output is</p>
-
-<blockquote>
-<pre>
-bits(0) = 00
-bits(1) = 01
-bits(2) = 10
-bits(3) = 11
-</pre>
-</blockquote>
-
-<p>An example of performing some bitwise operations.</p>
-
-<blockquote>
-<pre>
-#include &lt;iostream&gt;
-#include &lt;boost/dynamic_bitset.hpp&gt;
-int main(int, char*[]) {
- const boost::dynamic_bitset&lt;&gt; mask(12, 2730ul);
- std::cout &lt;&lt; "mask = " &lt;&lt; mask &lt;&lt; std::endl;
-
- boost::dynamic_bitset&lt;&gt; x(12);
-
- std::cout &lt;&lt; "Enter a 12-bit bitset in binary: " &lt;&lt; std::flush;
- if (std::cin &gt;&gt; x) {
- std::cout &lt;&lt; "input number: " &lt;&lt; x &lt;&lt; std::endl;
- std::cout &lt;&lt; "As unsigned long: " &lt;&lt; x.to_ulong() &lt;&lt; std::endl;
- std::cout &lt;&lt; "And with mask: " &lt;&lt; (x &amp; mask) &lt;&lt; std::endl;
- std::cout &lt;&lt; "Or with mask: " &lt;&lt; (x | mask) &lt;&lt; std::endl;
- std::cout &lt;&lt; "Shifted left: " &lt;&lt; (x &lt;&lt; 1) &lt;&lt; std::endl;
- std::cout &lt;&lt; "Shifted right: " &lt;&lt; (x &gt;&gt; 1) &lt;&lt; std::endl;
- }
- return EXIT_SUCCESS;
-}
-</pre>
-</blockquote>
-
-<p>The output is</p>
-
-<blockquote>
-<pre>
-mask = 101010101010
-Enter a 12-bit bitset in binary: 100110101101
-input number = 100110101101
-As unsigned long: 2477
-And with mask: 100010101000
-Or with mask: 101110101111
-Shifted left: 001101011010
-Shifted right: 010011010110
-</pre>
-</blockquote>
+<h3><a id="examples">Examples</a></h3>
 
-<h3><a name="rationale">Rationale</a></h3>
+<p>
+Example 1 (setting
+and reading some bits)
+</p>
+<p>
+Example 2 (creating
+some bitsets from integers)
+</p>
 
-The <tt>dynamic_bitset</tt> does not provide iterators (and
-therefore is not a <a href=
-"http://www.sgi.com/tech/stl/Container.html">Container</a>) for
-the following reasons:
+<p>
+Example 3 (performing
+input/output and some bitwise operations).
+</p>
 
-<ol>
-<li><tt>std::bitset</tt> does not have iterators, and
-<tt>dynamic_bitset</tt> is meant to be a run-time sized version
-of <tt>std::bitset</tt>.</li>
 
-<li>The <tt>dynamic_bitset</tt> is not designed to be a <a href=
-"http://www.sgi.com/tech/stl/Container.html">Container</a>.</li>
+<h3><a id="rationale">Rationale</a></h3>
+<p>
+<tt>dynamic_bitset</tt> is not a <a href=
+"http://www.sgi.com/tech/stl/Container.html">Container</a> and
+does not provide iterators for the following reason:
+</p>
 
+<ul>
 <li>A container with a proxy <tt>reference</tt> type can not
 fulfill the container requirements as specified in the C++
 standard (unless one resorts to strange iterator semantics).
@@ -478,7 +344,7 @@
 discussion of the problem see <i>Effective STL</i> by Scott
 Meyers). So <tt>dynamic_bitset</tt> tries to avoid these problems
 by not pretending to be a container.</li>
-</ol>
+</ul>
 
 <p>Some people prefer the name "toggle" to "flip". The name
 "flip" was chosen because that is the name used in <a href=
@@ -492,7 +358,7 @@
 "http://www.boost.org/more/error_handling.html">Error and Exception Handling</a>
 for the explanation.</p>
 
-<h3><a name="header-files">Header Files</a></h3>
+<h3><a id="header-files">Header Files</a></h3>
 
 <p>The class <tt>dynamic_bitset</tt> is defined in the header <a
 href=
@@ -501,33 +367,28 @@
 in the header <a href=
 "../../boost/dynamic_bitset_fwd.hpp">boost/dynamic_bitset_fwd.hpp</a>.</p>
 
-<h3><a name="template-parameters">Template parameters</a></h3>
+<h3><a id="template-parameters">Template parameters</a></h3>
 
-<table border summary=
+<table summary=
 "Describes the meaning of the template parameters and lists their corresponding default arguments">
 <tr>
 <th>Parameter</th>
 <th>Description</th>
 <th>Default</th>
 </tr>
-
 <tr>
-<td valign="top"><tt>Block</tt> </td>
-<td valign="top">The integer type in which the bits are
-stored.</td>
-<td valign="top"><tt>unsigned long</tt> </td>
+<td><tt>Block</tt></td>
+<td>The integer type in which the bits are stored.</td>
+<td><tt>unsigned long</tt></td>
 </tr>
-
 <tr>
-<td valign="top"><tt>Allocator</tt> </td>
-<td valign="top">The allocator type used for all internal memory
-management.</td>
-<td valign="top"><tt>std::allocator&lt;Block&gt;</tt> </td>
+
+<td><tt>Allocator</tt></td>
+<td>The allocator type used for all internal memory management.</td>
+<td><tt>std::allocator&lt;Block&gt;</tt></td>
 </tr>
 </table>
-
-<h3><a name="concepts-modeled">Concepts Modeled</a></h3>
-
+<h3><a id="concepts-modeled">Concepts Modeled</a></h3>
 <a href=
 "http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>, <a
 href=
@@ -538,20 +399,19 @@
 "http://www.sgi.com/tech/stl/LessThanComparable.html">LessThan
 Comparable</a>.
 
-<h3><a name="type-requirements">Type requirements</a></h3>
+<h3><a id="type-requirements">Type requirements</a></h3>
 
 <tt>Block</tt> is an unsigned integer type. <tt>Allocator</tt>
 satisfies the Standard requirements for an allocator.
 
-<h3><a name="public-base-classes">Public base classes</a></h3>
+<h3><a id="public-base-classes">Public base classes</a></h3>
 
 None.
+<h3><a id="nested-type-names">Nested type names</a></h3>
+<hr />
 
-<h3><a name="nested-type-names">Nested type names</a></h3>
-
-<hr>
 <pre>
-<a name="reference">dynamic_bitset::reference</a>
+<a id="reference">dynamic_bitset::reference</a>
 </pre>
 
 <p>A proxy class that acts as a reference to a single bit. It
@@ -572,29 +432,24 @@
 <th>Expression</th>
 <th>Semantics</th>
 </tr>
-
 <tr>
 <td><tt>x = b[i]</tt></td>
 <td>Assign the ith bit of <tt>b</tt> to <tt>x</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>(bool)b[i]</tt></td>
 <td>Return the ith bit of <tt>b</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>b[i] = x</tt></td>
 <td>Set the ith bit of <tt>b</tt> to the value of <tt>x</tt> and
 return <tt>b[i]</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>b[i] |= x</tt></td>
 <td>Or the ith bit of <tt>b</tt> with the value of <tt>x</tt> and
 return <tt>b[i]</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>b[i] &amp;= x</tt></td>
 <td>And the ith bit of <tt>b</tt> with the value of <tt>x</tt>
@@ -627,120 +482,112 @@
 
 <tr>
 <td><tt>b[i] &amp;= b[j]</tt></td>
-<td>And the ith bit of <tt>b</tt> with the jth bit of <tt>b</tt>
-and return <tt>b[i]</tt>.</td>
+<td>And the ith bit of <tt>b</tt> with the jth bit of <tt>b</tt> and return <tt>b[i]</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>b[i] ^= b[j]</tt></td>
-<td>Exclusive-Or the ith bit of <tt>b</tt> with the jth bit of
-<tt>b</tt> and return <tt>b[i]</tt>.</td>
-</tr>
+<td>Exclusive-Or the ith bit of <tt>b</tt> with the jth bit of <tt>b</tt> and return <tt>b[i]</tt>.</td>
 
+</tr>
 <tr>
 <td><tt>b[i] -= b[j]</tt></td>
-<td>If the jth bit of <tt>b</tt> is set, clear the ith bit of
-<tt>b</tt>. Returns <tt>b[i]</tt>.</td>
+<td>If the jth bit of <tt>b</tt> is set, clear the ith bit of <tt>b</tt>. Returns <tt>b[i]</tt>.</td>
 </tr>
-
 <tr>
 <td><tt>x = ~b[i]</tt></td>
-<td>Assign the opposite of the ith bit of <tt>b</tt> to
-<tt>x</tt>.</td>
-</tr>
 
+<td>Assign the opposite of the ith bit of <tt>b</tt> to <tt>x</tt>.</td>
+</tr>
 <tr>
 <td><tt>(bool)~b[i]</tt></td>
 <td>Return the opposite of the ith bit of <tt>b</tt>.</td>
 </tr>
-
 <tr>
-<td><tt>b[i].flip()</tt> </td>
+
+<td><tt>b[i].flip()</tt></td>
 <td>Flip the ith bit of <tt>b</tt> and return <tt>b[i]</tt>.</td>
 </tr>
 </table>
-
-<hr>
+<hr />
 <pre>
-<a name="const_reference">dynamic_bitset::const_reference</a>
+<a id="const_reference">dynamic_bitset::const_reference</a>
 </pre>
-
 The type <tt>bool</tt>.
 
-<hr>
 <pre>
-<a name="size_type">dynamic_bitset::size_type</a>
+<a id="size_type">dynamic_bitset::size_type</a>
 </pre>
-
 The unsigned integer type for representing the size of the bit set.
 
-<hr>
 <pre>
-<a name="block_type">dynamic_bitset::block_type</a>
+<a id="block_type">dynamic_bitset::block_type</a>
 </pre>
-
 The same type as <tt>Block</tt>.
 
-<hr>
 <pre>
-<a name="allocator_type">dynamic_bitset::allocator_type;</a>
+<a id="allocator_type">dynamic_bitset::allocator_type;</a>
 </pre>
-
 The same type as <tt>Allocator</tt>.
 
-<hr>
-<h3><a name="public-data-members">Public data members</a></h3>
 
-<hr>
+<hr />
+<h3><a id="public-data-members">Public data members</a></h3>
+
 <pre>
-<a name="bits_per_block">dynamic_bitset::bits_per_block</a>
+<a id="bits_per_block">dynamic_bitset::bits_per_block</a>
 </pre>
-
 The number of bits the type <tt>Block</tt> uses to represent values,
 excluding any padding bits. Numerically equal
 to <tt>std::numeric_limits&lt;Block&gt;::digits</tt>.
 
-<hr>
 <pre>
-<a name="npos">dynamic_bitset::npos</a>
+<a id="npos">dynamic_bitset::npos</a>
 </pre>
-
 The maximum value of <tt>size_type</tt>.
 
-<hr>
-<h3><a name="constructors">Constructors</a></h3>
+<hr />
+<h3><a id="constructors">Constructors</a></h3>
 
-<hr>
+<hr />
 <pre>
-<a name=
+<a id=
 "cons1">dynamic_bitset</a>(const Allocator&amp; alloc = Allocator())
 </pre>
 
 <b>Effects:</b> Constructs a bitset of size zero. A copy of the
 <tt>alloc</tt> object will be used in subsequent bitset
-operations such as <tt>resize</tt> to allocate memory.<br>
- <b>Postconditions:</b> <tt>this-&gt;size() == 0</tt>.<br>
+operations such as <tt>resize</tt> to allocate memory.<br />
+ <b>Postconditions:</b> <tt>this-&gt;size() == 0</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
  (Required by <a href=
 "http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
 Constructible</a>.)
 
-<hr>
+<hr />
 <pre>
-<a name="cons2">dynamic_bitset</a>(size_type num_bits,
+<a id="cons2">dynamic_bitset</a>(size_type num_bits,
                unsigned long value = 0,
                const Allocator&amp; alloc = Allocator())
 </pre>
 
 <b>Effects:</b> Constructs a bitset from an integer. The first
 <tt>M</tt> bits are initialized to the corresponding bits in
-<tt>val</tt> and all other bits, if any, to zero (where <tt>M =
+<tt>value</tt> and all other bits, if any, to zero (where <tt>M =
 min(num_bits, std::numeric_limits&lt;unsigned long&gt;::digits)</tt>). A copy of
 the <tt>alloc</tt> object will be used in subsequent bitset
-operations such as <tt>resize</tt> to allocate memory.<br>
- <b>Postconditions:</b>
+operations such as <tt>resize</tt> to allocate memory. Note that, e.g., the
+following
+<br /><br />
+<tt>
+dynamic_bitset b<>( 16, 7 );
+</tt><br /><br />
+will match the constructor from an iterator range (not this
+one), but the underlying implementation will still "do the right thing" and
+construct a bitset of 16 bits, from the value 7.
+<br />
+<b>Postconditions:</b>
 
 <ul>
 <li><tt>this-&gt;size() == num_bits</tt></li>
@@ -754,58 +601,90 @@
 
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
 
 
-<hr>
+<hr />
 <pre>
-<a name="cons5">dynamic_bitset</a>(const dynamic_bitset&amp; x)
+<a id="cons5">dynamic_bitset</a>(const dynamic_bitset&amp; x)
 </pre>
 
 <b>Effects:</b> Constructs a bitset that is a copy of the bitset
 <tt>x</tt>. The allocator for this bitset is a copy of the
-allocator in <tt>x</tt>. <br>
+allocator in <tt>x</tt>. <br />
  <b>Postconditions:</b> For all <tt>i</tt> in the range
-<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br>
+<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
  (Required by <a href=
 "http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.)
 
-<hr>
+<hr />
 <pre>
 template &lt;typename BlockInputIterator&gt;
 explicit
-<a name=
+<a id=
 "cons4">dynamic_bitset</a>(BlockInputIterator first, BlockInputIterator last,
                const Allocator&amp; alloc = Allocator());
 </pre>
 
-<b>Effects:</b> Constructs a bitset based on a range of blocks.
-Let <tt>*first</tt> be block number 0, <tt>*++first</tt> block
-number 1, etc. Block number <tt>b</tt> is used to initialize the
-bits of the dynamic_bitset in the position range
-<tt>[b*bits_per_block, (b+1)*bits_per_block)</tt>. For each block
-number <tt>b</tt> with value <tt>bval</tt>, the bit <tt>(bval
-&gt;&gt; i) &amp; 1</tt> corresponds to the bit at position
-<tt>(b * bits_per_block + i)</tt> in the bitset (where <tt>i</tt>
-goes through the range <tt>[0, bits_per_block)</tt>).<br>
- <b>Requires:</b> The type <tt>BlockInputIterator</tt> must be a
-model of <a href=
-"http://www.sgi.com/tech/stl/InputIterator.html">Input
-Iterator</a> and its <tt>value_type</tt> must be the same type as
-<tt>Block</tt>.<br>
- <b>Throws:</b> An allocation error if memory is exhausted
-(<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
-
+<b>Effects:</b>
+<ul>
+<li>
+If this constructor is called with a type <tt>BlockInputIterator</tt> which
+<i>is actually an integral type</i>, the library behaves as if the constructor
+from <tt>unsigned long</tt> had been called, with arguments
+<tt>static_cast&lt;size_type&gt;(first), last and alloc</tt>, in that order.
+
+Example:
+<pre>
+// b is constructed as if by calling the constructor
+//
+// dynamic_bitset(size_type num_bits,
+// unsigned long value = 0,
+// const Allocator&amp; alloc = Allocator())
+//
+// with arguments
+//
+// static_cast&lt;dynamic_bitset&lt;unsigned short&gt;::size_type&gt;(8),
+// 7,
+// Allocator()
+//
+dynamic_bitset&lt;unsigned short&gt; b(8, 7);
+</pre><br />
+<i>Note:</i><br/>
+This is analogous to what the standard mandates for sequence containers (namely,
+that if the type on which the template constructor is intantiated "does not
+qualify as an input iterator" then the other constructor is called; "the extent
+to which an implementation determines that a type cannot be an input iterator is
+unspecified, except that as a minimum integral types shall not qualify as input
+iterators").<br /><br />
+</li>
+<li>
+<i>Otherwise</i> (<i>i.e.</i> if the template argument is not an integral
+type), constructs&mdash;under the condition in the <tt>requires</tt>
+clause&mdash;a bitset based on a range of blocks. Let <tt>*first</tt> be block
+number 0, <tt>*++first</tt> block number 1, etc. Block number <tt>b</tt> is used
+to initialize the bits of the dynamic_bitset in the position range
+<tt>[b*bits_per_block, (b+1)*bits_per_block)</tt>. For each block number
+<tt>b</tt> with value <tt>bval</tt>, the bit <tt>(bval &gt;&gt; i) &amp; 1</tt>
+corresponds to the bit at position <tt>(b * bits_per_block + i)</tt> in the
+bitset (where <tt>i</tt> goes through the range <tt>[0, bits_per_block)</tt>).
+</li>
+</ul>
+<br />
+<b>Requires:</b> <tt>BlockInputIterator</tt> must be either an integral type or
+a model of <a href= "http://www.sgi.com/tech/stl/InputIterator.html">Input
+ Iterator</a> whose <tt>value_type</tt> is the same type as
+<tt>Block</tt>.<br /> <b>Throws:</b> An allocation error if memory is exhausted
+(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).<br />
 
-<hr>
+<hr />
 <pre>
 template&lt;typename Char, typename Traits, typename Alloc&gt;
 explicit
-<a name="cons3">dynamic_bitset</a>(const <a href=
+<a id="cons3">dynamic_bitset</a>(const <a href=
 "http://www.sgi.com/tech/stl/basic_string.html">std::basic_string</a>&lt;Char,Traits,Alloc&gt;&amp; s,
                typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type pos = 0,
                typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type n = <a
@@ -816,7 +695,7 @@
 
 <b>Precondition:</b> <tt>pos &lt;= s.size()</tt> and the
 characters used to initialize the bits must be <tt>0</tt> or
-<tt>1</tt>.<br>
+<tt>1</tt>.<br />
  <b>Effects:</b> Constructs a bitset from a string of 0's and
 1's. The first <tt>M</tt> bits are initialized to the
 corresponding characters in <tt>s</tt>, where <tt>M =
@@ -825,61 +704,61 @@
 the least significant bit. That is, character position <tt>pos +
 M - 1 - i</tt> corresponds to bit <tt>i</tt>. So, for example,
 <tt>dynamic_bitset(string("1101"))</tt> is the same as
-<tt>dynamic_bitset(13ul)</tt>.<br>
+<tt>dynamic_bitset(13ul)</tt>.<br />
  <b>Throws:</b> an allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
-<h3><a name="destructor">Destructor</a></h3>
+<hr />
+<h3><a id="destructor">Destructor</a></h3>
 
-<hr>
+<hr />
 <pre>
 ~dynamic_bitset()
 </pre>
 
 <b>Effects:</b> Releases the memory associated with this bitset
-and destroys the bitset object itself.<br>
+and destroys the bitset object itself.<br />
  <b>Throws:</b> nothing.
 
-<hr>
-<h3><a name="member-functions">Member Functions</a></h3>
+<hr />
+<h3><a id="member-functions">Member Functions</a></h3>
 
-<hr>
+<hr />
 <pre>
-void <a name="swap">swap</a>(dynamic_bitset&amp; b);
+void <a id="swap">swap</a>(dynamic_bitset&amp; b);
 </pre>
 
 <b>Effects:</b> The contents of this bitset and bitset <tt>b</tt>
-are exchanged.<br>
+are exchanged.<br />
 <b>Postconditions:</b> This bitset is equal to the original
 <tt>b</tt>, and <tt>b</tt> is equal to the previous version of
-this bitset.<br>
+this bitset.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "assign">operator=</a>(const dynamic_bitset&amp; x)
 </pre>
 
 <b>Effects:</b> This bitset becomes a copy of the bitset
-<tt>x</tt>.<br>
+<tt>x</tt>.<br />
  <b>Postconditions:</b> For all <tt>i</tt> in the range
-<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br>
- <b>Returns:</b> <tt>*this</tt>.<br>
- <b>Throws:</b> nothing. <br>
+<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br />
+ <b>Returns:</b> <tt>*this</tt>.<br />
+ <b>Throws:</b> nothing. <br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.)
 
-<hr>
+<hr />
 <pre>
-allocator_type <a name="get_allocator">get_allocator()</a> const;
+allocator_type <a id="get_allocator">get_allocator()</a> const;
 </pre>
  <b>Returns:</b> A copy of the allocator object used to construct <tt>*this</tt>.
 
-<hr>
+<hr />
 <pre>
-void <a name=
+void <a id=
 "resize">resize</a>(size_type num_bits, bool value = false);
 </pre>
 
@@ -889,36 +768,36 @@
 <tt>[size(),num_bits)</tt> are all set to <tt>value</tt>. If
 <tt>num_bits &lt; size()</tt> then the bits in the range
 <tt>[0,num_bits)</tt> stay the same (and the remaining bits are
-discarded).<br>
- <b>Postconditions:</b> <tt>this-&gt;size() == num_bits</tt>.<br>
+discarded).<br />
+ <b>Postconditions:</b> <tt>this-&gt;size() == num_bits</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
 
 
-<hr>
+<hr />
 <pre>
-void <a name="clear">clear</a>()
+void <a id="clear">clear</a>()
 </pre>
 
-<b>Effects:</b> The size of the bitset becomes zero.<br>
+<b>Effects:</b> The size of the bitset becomes zero.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-void <a name="push_back">push_back</a>(bool value);
+void <a id="push_back">push_back</a>(bool value);
 </pre>
 
 <b>Effects:</b> Increases the size of the bitset by one, and sets
-the value of the new most-significant bit to <tt>value</tt>.<br>
+the value of the new most-significant bit to <tt>value</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
 
 
-<hr>
+<hr />
 <pre>
-void <a name="append1">append</a>(Block value);
+void <a id="append1">append</a>(Block value);
 </pre>
 
 <b>Effects:</b> Appends the bits in <tt>value</tt> to the bitset
@@ -926,16 +805,16 @@
 the bitset by <tt>bits_per_block</tt>. Let <tt>s</tt> be the old
 size of the bitset, then for <tt>i</tt> in the range
 <tt>[0,bits_per_block)</tt>, the bit at position <tt>(s + i)</tt>
-is set to <tt>((value &gt;&gt; i) &amp; 1)</tt>.<br>
+is set to <tt>((value &gt;&gt; i) &amp; 1)</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
 
 
-<hr>
+<hr />
 <pre>
 template &lt;typename BlockInputIterator&gt;
-void <a name=
+void <a id=
 "append2">append</a>(BlockInputIterator first, BlockInputIterator last);
 </pre>
 
@@ -951,19 +830,19 @@
 model of <a href=
 "http://www.sgi.com/tech/stl/InputIterator.html">Input
 Iterator</a> and the <tt>value_type</tt> must be the same type as
-<tt>Block</tt>.<br>
+<tt>Block</tt>.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if
-<tt>Allocator=std::allocator</tt>).<br>
+<tt>Allocator=std::allocator</tt>).<br />
 
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-and-assign">operator&amp;=</a>(const dynamic_bitset&amp; rhs)
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
+<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br />
  <b>Effects:</b> Bitwise-AND all the bits in <tt>rhs</tt> with
 the bits in this bitset. This is equivalent to:
 
@@ -972,16 +851,16 @@
   (*this)[i] = (*this)[i] &amp; rhs[i];
 </pre>
 
-<b>Returns:</b> <tt>*this</tt>.<br>
+<b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-or-assign">operator|=</a>(const dynamic_bitset&amp; rhs)
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
+<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br />
  <b>Effects:</b> Bitwise-OR's all the bits in <tt>rhs</tt> with
 the bits in this bitset. This is equivalent to:
 
@@ -990,16 +869,16 @@
   (*this)[i] = (*this)[i] | rhs[i];
 </pre>
 
-<b>Returns:</b> <tt>*this</tt>.<br>
+<b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-xor-assign">operator^=</a>(const dynamic_bitset&amp; rhs)
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
+<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br />
  <b>Effects:</b> Bitwise-XOR's all the bits in <tt>rhs</tt> with
 the bits in this bitset. This is equivalent to:
 
@@ -1008,16 +887,16 @@
   (*this)[i] = (*this)[i] ^ rhs[i];
 </pre>
 
-<b>Returns:</b> <tt>*this</tt>.<br>
+<b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-sub-assign">operator-=</a>(const dynamic_bitset&amp; rhs)
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
+<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br />
  <b>Effects:</b> Computes the set difference of this bitset and
 the <tt>rhs</tt> bitset. This is equivalent to:
 
@@ -1026,207 +905,207 @@
   (*this)[i] = (*this)[i] &amp;&amp; !rhs[i];
 </pre>
 
-<b>Returns:</b> <tt>*this</tt>.<br>
+<b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-sl-assign">operator&lt;&lt;=</a>(size_type n)
 </pre>
 
 <b>Effects:</b> Shifts the bits in this bitset to the left by
 <tt>n</tt> bits. For each bit in the bitset, the bit at position
 pos takes on the previous value of the bit at position <tt>pos -
-n</tt>, or zero if no such bit exists.<br>
- <b>Returns:</b> <tt>*this</tt>.<br>
+n</tt>, or zero if no such bit exists.<br />
+ <b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "op-sr-assign">operator&gt;&gt;=</a>(size_type n)
 </pre>
 
 <b>Effects:</b> Shifts the bits in this bitset to the right by
 <tt>n</tt> bits. For each bit in the bitset, the bit at position
 <tt>pos</tt> takes on the previous value of bit <tt>pos + n</tt>,
-or zero if no such bit exists.<br>
- <b>Returns:</b> <tt>*this</tt>.<br>
+or zero if no such bit exists.<br />
+ <b>Returns:</b> <tt>*this</tt>.<br />
  <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-sl">operator&lt;&lt;</a>(size_type n) const
 </pre>
 
 <b>Returns:</b> a copy of <tt>*this</tt> shifted to the left by
 <tt>n</tt> bits. For each bit in the returned bitset, the bit at
 position pos takes on the value of the bit at position <tt>pos -
-n</tt> of this bitset, or zero if no such bit exists.<br>
+n</tt> of this bitset, or zero if no such bit exists.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-sr">operator&gt;&gt;</a>(size_type n) const
 </pre>
 
 <b>Returns:</b> a copy of <tt>*this</tt> shifted to the right by
 <tt>n</tt> bits. For each bit in the returned bitset, the bit at
 position pos takes on the value of the bit at position <tt>pos +
-n</tt> of this bitset, or zero if no such bit exists.<br>
+n</tt> of this bitset, or zero if no such bit exists.<br />
  <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name="set1">set</a>()
+dynamic_bitset&amp; <a id="set1">set</a>()
 </pre>
 
-<b>Effects:</b> Sets every bit in this bitset to 1.<br>
-<b>Returns:</b> <tt>*this</tt><br>
+<b>Effects:</b> Sets every bit in this bitset to 1.<br />
+<b>Returns:</b> <tt>*this</tt><br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name="flip1">flip</a>()
+dynamic_bitset&amp; <a id="flip1">flip</a>()
 </pre>
 
-<b>Effects:</b> Flips the value of every bit in this bitset.<br>
-<b>Returns:</b> <tt>*this</tt><br>
+<b>Effects:</b> Flips the value of every bit in this bitset.<br />
+<b>Returns:</b> <tt>*this</tt><br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name="op-not">operator~</a>() const
+dynamic_bitset <a id="op-not">operator~</a>() const
 </pre>
 
 <b>Returns:</b> a copy of <tt>*this</tt> with all of its bits
-flipped.<br>
+flipped.<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name="reset1">reset</a>()
+dynamic_bitset&amp; <a id="reset1">reset</a>()
 </pre>
 
-<b>Effects:</b> Clears every bit in this bitset.<br>
-<b>Returns:</b> <tt>*this</tt><br>
+<b>Effects:</b> Clears every bit in this bitset.<br />
+<b>Returns:</b> <tt>*this</tt><br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name=
+dynamic_bitset&amp; <a id=
 "set2">set</a>(size_type n, bool val = true)
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
  <b>Effects:</b> Sets bit <tt>n</tt> if <tt>val</tt> is
 <tt>true</tt>, and clears bit <tt>n</tt> if <tt>val</tt> is
-<tt>false</tt>. <br>
+<tt>false</tt>. <br />
  <b>Returns:</b> <tt>*this</tt>
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name="reset2">reset</a>(size_type n)
+dynamic_bitset&amp; <a id="reset2">reset</a>(size_type n)
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
-<b>Effects:</b> Clears bit <tt>n</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
+<b>Effects:</b> Clears bit <tt>n</tt>.<br />
 <b>Returns:</b> <tt>*this</tt>
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset&amp; <a name="flip2">flip</a>(size_type n)
+dynamic_bitset&amp; <a id="flip2">flip</a>(size_type n)
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
-<b>Effects:</b> Flips bit <tt>n</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
+<b>Effects:</b> Flips bit <tt>n</tt>.<br />
 <b>Returns:</b> <tt>*this</tt>
 
-<hr>
+<hr />
 <pre>
-size_type <a name="size">size</a>() const
+size_type <a id="size">size</a>() const
 </pre>
 
-<b>Returns:</b> the number of bits in this bitset.<br>
+<b>Returns:</b> the number of bits in this bitset.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-size_type <a name="num_blocks">num_blocks</a>() const
+size_type <a id="num_blocks">num_blocks</a>() const
 </pre>
 
-<b>Returns:</b> the number of blocks in this bitset.<br>
+<b>Returns:</b> the number of blocks in this bitset.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-size_type <a name="max_size">max_size</a>() const;
+size_type <a id="max_size">max_size</a>() const;
 </pre>
 
 <b>Returns:</b> the maximum size of a <tt>dynamic_bitset</tt>
 object having the same type as <tt>*this</tt>. Note that if
 any <tt>dynamic_bitset</tt> operation causes <tt>size()</tt> to
 exceed <tt>max_size()</tt> then the <i>behavior is undefined</i>.
-<br><br>[The semantics of this function could change slightly
-when lib issue 197 will be closed]<br>
+<br /><br />[The semantics of this function could change slightly
+when lib issue 197 will be closed]<br />
 
-<hr>
+<hr />
 <pre>
-bool <a name="empty">empty</a>() const;
+bool <a id="empty">empty</a>() const;
 </pre>
 
 <b>Returns:</b> <tt>true</tt> if <tt>this->size() == 0</tt>, <tt>false</tt>
 otherwise. <i>Note</i>: not to be confused with <tt>none()</tt>, that has
 different semantics.
 
-<hr>
+<hr />
 <pre>
-size_type <a name="count">count</a>() const
+size_type <a id="count">count</a>() const
 </pre>
 
 <b>Returns:</b> the number of bits in this bitset that are
-set.<br>
+set.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-bool <a name="any">any</a>() const
+bool <a id="any">any</a>() const
 </pre>
 
 <b>Returns:</b> <tt>true</tt> if any bits in this bitset are set,
-and otherwise returns <tt>false</tt>.<br>
+and otherwise returns <tt>false</tt>.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-bool <a name="none">none</a>() const
+bool <a id="none">none</a>() const
 </pre>
 
 <b>Returns:</b> <tt>true</tt> if no bits are set, and otherwise
-returns <tt>false</tt>.<br>
+returns <tt>false</tt>.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-bool <a name="test">test</a>(size_type n) const
+bool <a id="test">test</a>(size_type n) const
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
  <b>Returns:</b> <tt>true</tt> if bit <tt>n</tt> is set and
 <tt>false</tt> is bit <tt>n</tt> is 0.
 
-<hr>
+<hr />
 <pre>
-reference <a name="bracket">operator[]</a>(size_type n)
+reference <a id="bracket">operator[]</a>(size_type n)
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
  <b>Returns:</b> a <tt>reference</tt> to bit <tt>n</tt>. Note
 that <tt>reference</tt> is a proxy class with an assignment
 operator and a conversion to <tt>bool</tt>, which allows you to
@@ -1235,100 +1114,100 @@
 other respects the proxy is not the same as the true reference
 type <tt>bool&amp;</tt>.
 
-<hr>
+<hr />
 <pre>
-bool <a name="const-bracket">operator[]</a>(size_type n) const
+bool <a id="const-bracket">operator[]</a>(size_type n) const
 </pre>
 
-<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
+<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br />
 <b>Returns:</b> The same as <tt>test(n)</tt>.
 
-<hr>
+<hr />
 <pre>
-unsigned long <a name="to_ulong">to_ulong</a>() const
+unsigned long <a id="to_ulong">to_ulong</a>() const
 </pre>
 
 <b>Returns:</b> The numeric value corresponding to the bits in <tt>*this</tt>.
-<br>
+<br />
 <b>Throws:</b> <tt>std::overflow_error</tt> if that value is too large to
 be represented in an <tt>unsigned long</tt>, i.e. if <tt>*this</tt> has
 any non-zero bit at a position <tt>&gt;=
 std::numeric_limits&lt;unsigned long&gt;::digits</tt>.
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br>
+<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br />
 <b>Returns:</b> true if this bitset is a subset of bitset
 <tt>a</tt>. That is, it returns true if, for every bit that is
 set in this bitset, the corresponding bit in bitset <tt>a</tt> is
-also set. Otherwise this function returns false.<br>
+also set. Otherwise this function returns false.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const
 </pre>
 
-<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br>
+<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br />
 <b>Returns:</b> true if this bitset is a proper subset of bitset
 <tt>a</tt>. That is, it returns true if, for every bit that is
 set in this bitset, the corresponding bit in bitset <tt>a</tt> is
 also set and if <tt>this-&gt;count() &lt; a.count()</tt>.
-Otherwise this function returns false.<br>
+Otherwise this function returns false.<br />
 <b>Throws:</b> nothing.
 
-<hr>
+<hr />
 <pre>
-size_type <a name = "find_first">find_first</a>() const;
+size_type <a id = "find_first">find_first</a>() const;
 </pre>
 
 <b>Returns:</b> the lowest index <tt>i</tt> such as bit <tt>i</tt>
 is set, or <tt>npos</tt> if <tt>*this</tt> has no on bits.
 
-<hr>
+<hr />
 <pre>
-size_type <a name="find_next">find_next</a>(size_type pos) const;
+size_type <a id="find_next">find_next</a>(size_type pos) const;
 </pre>
 
 <b>Returns:</b> the lowest index <tt>i</tt> greater than
 <tt>pos</tt> such as bit <tt>i</tt> is set, or <tt>npos</tt> if
 no such index exists.
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-equal">operator==</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
 <b>Returns:</b> <tt>true</tt> if <tt>this-&gt;size() ==
 rhs.size()</tt> and if for all <tt>i</tt> in the range
 <tt>[0,rhs.size())</tt>, <tt>(*this)[i] == rhs[i]</tt>. Otherwise
-returns <tt>false</tt>.<br>
- <b>Throws:</b> nothing.<br>
+returns <tt>false</tt>.<br />
+ <b>Throws:</b> nothing.<br />
  (Required by <a href=
 "http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
 Comparable</a>.)
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-not-equal">operator!=</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
-<b>Returns:</b> <tt>!((*this) == rhs)</tt><br>
-<b>Throws:</b> nothing.<br>
+<b>Returns:</b> <tt>!((*this) == rhs)</tt><br />
+<b>Throws:</b> nothing.<br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
 Comparable</a>.)
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-less">operator&lt;</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
@@ -1336,104 +1215,104 @@
 less than <tt>rhs</tt>, and returns <tt>false</tt> otherwise.
 (See the description of <a href=
 "http://www.sgi.com/tech/stl/lexicographical_compare.html">lexicographical_compare</a>
-for a definition of lexicographic ordering). <br>
-<b>Throws:</b> nothing.<br>
+for a definition of lexicographic ordering). <br />
+<b>Throws:</b> nothing.<br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
 Comparable</a>.)
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-greater">operator&gt;</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
 <b>Returns:</b> <tt>!((*this) &lt; rhs || (*this) ==
-rhs)</tt><br>
-<b>Throws:</b> nothing.<br>
+rhs)</tt><br />
+<b>Throws:</b> nothing.<br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
 Comparable</a>.)
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-less-equal">operator&lt;=</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
-<b>Returns:</b> <tt>(*this) &lt; rhs || (*this) == rhs</tt><br>
-<b>Throws:</b> nothing.<br>
+<b>Returns:</b> <tt>(*this) &lt; rhs || (*this) == rhs</tt><br />
+<b>Throws:</b> nothing.<br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
 Comparable</a>.)
 
-<hr>
+<hr />
 <pre>
-bool <a name=
+bool <a id=
 "op-greater-equal">operator&gt;=</a>(const dynamic_bitset&amp; rhs) const
 </pre>
 
-<b>Returns:</b> <tt>(*this) &gt; rhs || (*this) == rhs</tt><br>
-<b>Throws:</b> nothing.<br>
+<b>Returns:</b> <tt>(*this) &gt; rhs || (*this) == rhs</tt><br />
+<b>Throws:</b> nothing.<br />
 (Required by <a href=
 "http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
 Comparable</a>.)
 
-<hr>
-<h3><a name="non-member-functions">Non-Member Functions</a></h3>
+<hr />
+<h3><a id="non-member-functions">Non-Member Functions</a></h3>
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-and">operator&amp;</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
 </pre>
 
-<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
+<b>Requires:</b> <tt>a.size() == b.size()</tt><br />
 <b>Returns:</b> A new bitset that is the bitwise-AND of the
-bitsets <tt>a</tt> and <tt>b</tt>.<br>
+bitsets <tt>a</tt> and <tt>b</tt>.<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-or">operator|</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
 </pre>
 
-<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
+<b>Requires:</b> <tt>a.size() == b.size()</tt><br />
 <b>Returns:</b> A new bitset that is the bitwise-OR of the
-bitsets <tt>a</tt> and <tt>b</tt>.<br>
+bitsets <tt>a</tt> and <tt>b</tt>.<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-xor">operator^</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
 </pre>
 
-<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
+<b>Requires:</b> <tt>a.size() == b.size()</tt><br />
 <b>Returns:</b> A new bitset that is the bitwise-XOR of the
-bitsets <tt>a</tt> and <tt>b</tt>.<br>
+bitsets <tt>a</tt> and <tt>b</tt>.<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
-dynamic_bitset <a name=
+dynamic_bitset <a id=
 "op-sub">operator-</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
 </pre>
 
-<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
+<b>Requires:</b> <tt>a.size() == b.size()</tt><br />
 <b>Returns:</b> A new bitset that is the set difference of the
-bitsets <tt>a</tt> and <tt>b</tt>.<br>
+bitsets <tt>a</tt> and <tt>b</tt>.<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 
-<hr>
+<hr />
 <pre>
 template &lt;typename CharT, typename Alloc&gt;
-void <a name=
+void <a id=
 "to_string">to_string</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b,
                <a href=
 "http://www.sgi.com/tech/stl/basic_string.html">std::basic_string</a>&lt;Char,Traits,Alloc&gt;&amp; s)
@@ -1443,9 +1322,9 @@
 string <tt>s</tt>. A character in the string is <tt>'1'</tt> if
 the corresponding bit is set, and <tt>'0'</tt> if it is not.
 Character position <tt>i</tt> in the string corresponds to bit
-position <tt>b.size() - 1 - i</tt>. <br>
+position <tt>b.size() - 1 - i</tt>. <br />
  <b>Throws:</b> If memory is exhausted, the string will throw an
-allocation error.<br>
+allocation error.<br />
  <b>Rationale:</b> This function is not a member function taking
 zero arguments and returning a string for a couple reasons.
 First, this version can be slighly more efficient because the
@@ -1456,10 +1335,10 @@
 are familiar with explicit template parameters, and some C++
 compilers do not handle them properly.
 
-<hr>
+<hr />
 <pre>
 template &lt;typename Block, typename Alloc, typename BlockOutputIterator&gt;
-void <a name=
+void <a id=
 "to_block_range">to_block_range</a>(const dynamic_bitset&lt;Block, Alloc&gt;&amp; b, BlockOutputIterator result)
 </pre>
 
@@ -1471,7 +1350,7 @@
 <tt>[bits_pre_block,2*bits_per_block)</tt>, and so on. For each
 block <tt>bval</tt> written, the bit <tt>(bval &gt;&gt; i) &amp;
 1</tt> corresponds to the bit at position <tt>(b * bits_per_block
-+ i)</tt> in the bitset.<br>
++ i)</tt> in the bitset.<br />
  <b>Requires:</b> The type <tt>BlockOutputIterator</tt> must be a
 model of <a href=
 "http://www.sgi.com/tech/stl/OutputIterator.html">Output
@@ -1479,27 +1358,27 @@
 <tt>Block</tt>. Further, the size of the output range must be
 greater or equal <tt>b.num_blocks()</tt>.
 
-<hr>
+<hr />
 <pre>
 template &lt;typename BlockIterator, typename Block, typename Alloc&gt;
-void <a name=
+void <a id=
 "from_block_range">from_block_range</a>(BlockIterator first,
     BlockIterator last, const dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
 </pre>
 
 <b>Effects:</b> Reads blocks from the iterator range into the
-bitset. <br>
+bitset. <br />
  <b>Requires:</b> The type <tt>BlockIterator</tt> must be a model
 of <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
 Iterator</a> and its <tt>value_type</tt> must be the same type as
 <tt>Block</tt>. The size of the iterator range must be less or
 equal to <tt>b.num_blocks()</tt>.
 
-<hr>
+<hr />
 <pre>
 template &lt;typename Char, typename Traits, typename Block, typename Alloc&gt;
 basic_ostream&lt;Char, Traits&gt;&amp;
-<a name=
+<a id=
 "op-out">operator&lt;&lt;</a>(basic_ostream&lt;Char, Traits&gt;&amp; os, const dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
 </pre>
 
@@ -1509,7 +1388,7 @@
 <pre>
 std::basic_string&lt;Char, Traits&gt; s;
 boost::to_string(x, s):
-os << s;
+os &lt;&lt; s;
 </pre>
 
 except that the stream inserter takes into accout the locale imbued into
@@ -1528,22 +1407,22 @@
 Then, the output, the effects on <tt>os</tt> and the exception behavior
 is the same as outputting the object <tt>s</tt> to <tt>os</tt> (same
 width, same exception mask, same padding, same setstate() logic)
-<br>
-<b>Returns:</b> os <br>
+<br />
+<b>Returns:</b> os <br />
 <b>Throws:</b> <tt>std::ios_base::failure</tt> if there is a
 problem writing to the stream.
 
-<hr>
+<hr />
 <pre>
 template &lt;typename Char, typename Traits, typename Block, typename Alloc&gt;
 std::basic_istream&lt;Char,Traits&gt;&amp;
-<a name=
+<a id=
 "op-in">operator&gt;&gt;</a>(std::basic_istream&lt;Char,Traits&gt;&amp; is, dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
 </pre>
 
 <b>Effects:</b> Extracts a <tt>dynamic_bitset</tt> from an input stream.
-<br><br>
- <i>Definitions:</i><br><br>
+<br /><br />
+ <i>Definitions:</i><br /><br />
  Let <i>Tr</i> be the traits_type of <i>is</i>. Then:
  <ol>
  <li>
@@ -1570,46 +1449,44 @@
 otherwise <tt>n</tt> = <tt>b.max_size()</tt>.
 
 Unless the extractor is exited via an exception, characters are extracted (and
-corresponding bits appended) until any of the following occurs:<br>
+corresponding bits appended) until any of the following occurs:<br />
 
 <ul>
 <li> <tt>n</tt> bits are stored into the bitset;</li>
 <li> end-of-file, or an error, occurs on the input sequence;</li>
 <li> the next available input character isn't a bitset digit</li>
 </ul>
-<br> If no exception caused the function to exit then <tt>is.width(0)</tt> is
+<br /> If no exception caused the function to exit then <tt>is.width(0)</tt> is
      called, regardless of how many characters were actually extracted. The
      sentry object k is destroyed.
-<br>
-<br>If the function extracts no characters[???], it calls is.setstate(std::ios::failbit),
+<br />
+<br />If the function extracts no characters[???], it calls is.setstate(std::ios::failbit),
      which may throw <tt>std::ios_base::failure</tt>.
 
 
-<br>------
+<br />------
 
 
-<br>
+<br />
 <b>Throws:</b> An allocation error if memory is exhausted
 (<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
 A <tt>std::ios_base::failure</tt> if there is a problem reading
 from the stream.
 
-<hr>
-<h3><a name="exception-guarantees">Exception guarantees</a></h3>
+<hr />
+<h3><a id="exception-guarantees">Exception guarantees</a></h3>
 
 All of <tt>dynamic_bitset</tt> functions offer at least the basic
-guarantee. In addition some functions offer the strong or the nothrow
-guarantee as summarized in the table below (the destructor, as usual,
-doesn't throw):
-<table summary="" border>
-<tr><td>-</td><td><i>strong</i></td><td><i>nothrow</i></td></tr>
-<tr><td>f</td><td> </td><td><b> x </b></td></tr>
-</table>
+exception guarantee.
 
+<hr />
+<h3><a id="changes-from-previous-ver">Changes from previous version(s)</a></h3>
 
-
-<hr>
-<h3><a name="changes-from-previous-ver">Changes from previous version(s)</a></h3>
+<h4><i>Changes in Boost 1.37.0</i></h4>
+<ul>
+<li>The constructor from a block-range implements a <i>do-the-right-thing</i>
+behavior, a la standard sequences.</li>
+</ul>
 
 <!-- Changes from Boost 1.31.0 -->
 <h4><i>Changes from Boost 1.31.0</i></h4>
@@ -1621,15 +1498,15 @@
 extractor but there are some differences the user should be aware
 of; so, please, look at the documentation.
 (One of the differences concerns the case where
- stream.width() > bitset.max_size() > 0;
-in that circumstance the extractor of dynamic_bitset never attempts to
+<code>stream.width() > bitset.max_size() > 0</code>
+In that circumstance the extractor of dynamic_bitset never attempts to
 extract more than max_size() characters, whereas the extractor of
 basic_string goes on and, on conforming implementations, eventually
 throws a length_error. Note: That's what the standard mandates -see
 especially library issue 83- but not all implementations conform)
-<br><br>
+<br /><br />
 The stream extractor is now also 'exception-aware' in the sense that
-it works correctly when setting exception masks on the stream.<br><br>
+it works correctly when setting exception masks on the stream.<br /><br />
 </li>
 <li>
 Several member functions (<tt>empty()</tt>, <tt>find_first()</tt>
@@ -1654,19 +1531,19 @@
 </li>
 </ul>
 <i>General improvements</i>
-<br><br>
+<br /><br />
 Several optimizations to member and non-member functions and to the
 nested class <tt>reference</tt>.
 
-<hr>
-<h3><a name="see-also">See also</a></h3>
+<hr />
+<h3><a id="see-also">See also</a></h3>
 
 <tt><a href=
 "http://www.sgi.com/tech/stl/bitset.html">std::bitset</a></tt>,
 <tt><a href=
 "http://www.sgi.com/tech/stl/Vector.html">std::vector</a></tt>,
 
-<h3><a name="acknowledgements">Acknowledgements</a></h3>
+<h3><a id="acknowledgements">Acknowledgements</a></h3>
 
 <p>We would like to thank the Boost community for putting in the
 time to review and accept this library. This library is much
@@ -1676,37 +1553,37 @@
 James Kanze for his invaluable help with the internationalization
 issues.</p>
 
-<hr>
-<table summary="">
-<tr>
-<td></td>
-</tr>
-
-<tr valign="top">
-<td nowrap>Copyright &copy; 2001</td>
-<td>Jeremy Siek,
-Indiana University (<a href=
-"mailto:jsiek_at_[hidden]">jsiek_at_[hidden]</a>)<br>
-Chuck Allison, Senior
-Editor, C/C++ Users Journal (<a href=
-"mailto:cda_at_[hidden]">cda_at_[hidden]</a>)<br>
-</td>
-</tr>
-
-<tr valign="top">
-<td nowrap>Copyright &copy; 2003-2004</td>
-<td>Gennaro Prota</td>
+<table summary="Copyright"> <tr> <td>Copyright &copy; 2001</td>
+<td><a href="http://www.boost.org/people/jeremy_siek.htm">Jeremy
+Siek</a>, Indiana University (<a
+href="mailto:jsiek_at_[hidden]">jsiek_at_[hidden]</a>)<br /> <a
+href="http://freshsources.com">Chuck Allison</a>, Senior Editor,
+C/C++ Users Journal (<a
+href="mailto:cda_at_[hidden]">cda_at_[hidden]</a>)<br
+/></td> </tr> <tr>
+<td>Copyright &copy; 2003-2004, 2008</td> <td><a
+ href="http://gennaro-prota.50webs.com/">Gennaro Prota</a>
+ (name.surname yahoo.com)</td>
 </tr>
 </table>
+<br />
+<div class="legalnotice">
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt
+ or copy at <a class="ulink" href="http://www.boost.org/LICENSE_1_0.txt">
+http://www.boost.org/LICENSE_1_0.txt>)
+</div>
+
 
-<!-- LocalWords: dynamic bitset alt gif iostream hpp int bitsets const ul ulong
- -->
-<!-- LocalWords: STL LessThan alloc num typename BlockInputIterator html pos
- -->
-<!-- LocalWords: npos bool rhs OR's XOR's val CharT istream ostream os siek
- -->
-<!-- LocalWords: htm namespace enum sizeof BlockOutputIterator fwd ith jth
- -->
+</div>
+</div>
+</div>
+</div>
+</div>
+</div>
 </body>
+<!-- LocalWords: dynamic bitset alt gif iostream hpp int bitsets const ul ulong -->
+<!-- LocalWords: STL LessThan alloc num typename BlockInputIterator html pos -->
+<!-- LocalWords: npos bool rhs OR's XOR's val CharT istream ostream os siek -->
+<!-- LocalWords: htm namespace enum sizeof BlockOutputIterator fwd ith jth -->
 </html>
-

Modified: branches/release/tools/boostbook/setup_boostbook.py
==============================================================================
--- branches/release/tools/boostbook/setup_boostbook.py (original)
+++ branches/release/tools/boostbook/setup_boostbook.py 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -10,12 +10,13 @@
 # right now it is used only be release scripts
 
 # User configuration
+# (MAINTANERS: please, keep in synch with setup_boostbook.sh)
 DOCBOOK_XSL_VERSION = "1.73.2"
 DOCBOOK_DTD_VERSION = "4.2"
 FOP_VERSION = "0.94"
 FOP_JDK_VERSION="1.4"
-FOP_MIRROR = "
http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop"
-SOURCEFORGE_MIRROR = "http://puzzle.dl.sourceforge.net"
+FOP_MIRROR = "http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop/binaries"
+SOURCEFORGE_MIRROR = "http://dl.sourceforge.net"
 
 # No user configuration below this point-------------------------------------
 

Modified: branches/release/tools/boostbook/setup_boostbook.sh
==============================================================================
--- branches/release/tools/boostbook/setup_boostbook.sh (original)
+++ branches/release/tools/boostbook/setup_boostbook.sh 2008-09-14 06:46:28 EDT (Sun, 14 Sep 2008)
@@ -6,11 +6,12 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 
 # User configuration
+# (MAINTANERS: please, keep in synch with setup_boostbook.py)
 DOCBOOK_XSL_VERSION=1.73.2
 DOCBOOK_DTD_VERSION=4.2
 FOP_VERSION=0.94
 FOP_JDK_VERSION=1.4
-FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop
+FOP_MIRROR=http://mirrors.ibiblio.org/pub/mirrors/apache/xmlgraphics/fop/binaries
 SOURCEFORGE_MIRROR=http://dl.sourceforge.net
 HTTP_GET_CMD="curl -O"
 


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