Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/dynamic_bitset/dynamic_bitset.html @ 47

Last change on this file since 47 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 56.4 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3
4<!--
5                        (C) Jeremy Siek 2001.
6                     (C) Gennaro Prota 2003-2004.
7
8       Distributed under the Boost Software License, Version 1.0.
9          (See accompanying file LICENSE_1_0.txt or copy at
10                http://www.boost.org/LICENSE_1_0.txt)
11 -->
12
13<!--
14   Copyright (c) 1996-1999
15   Silicon Graphics Computer Systems, Inc.
16
17   Permission to use, copy, modify, distribute and sell this software
18   and its documentation for any purpose is hereby granted without fee,
19   provided that the above copyright notice appears in all copies and
20   that both that copyright notice and this permission notice appear
21   in supporting documentation.  Silicon Graphics makes no
22   representations about the suitability of this software for any
23   purpose.  It is provided "as is" without express or implied warranty.
24
25   Copyright (c) 1994
26   Hewlett-Packard Company
27
28   Permission to use, copy, modify, distribute and sell this software
29   and its documentation for any purpose is hereby granted without fee,
30   provided that the above copyright notice appears in all copies and
31   that both that copyright notice and this permission notice appear
32   in supporting documentation.  Hewlett-Packard Company makes no
33   representations about the suitability of this software for any
34   purpose.  It is provided "as is" without express or implied warranty.
35
36  -->
37<head>
38<title>dynamic_bitset&lt;Block, Allocator&gt;</title>
39</head>
40<body text="#000000" link="#006600" alink="#003300"
41                  vlink="#7C7F87" bgcolor="#FFFFFF">
42<img src="../../boost.png" alt="boost.png (6897 bytes)"
43align="middle" width="277" height="86">
44
45<p><!--end header-->
46<br>
47</p>
48
49<!-- BEGIN TODO
50TODO:
51<ul>
52 <li> ask to Jeremy about reference::operator&amp; and about
53   making reference itself private</li>
54 <li>check the whole synopsis against code changes </li>
55 <li>document intersects() after we reach consensus</li>
56</ul>
57<br>
58Note:
59   Other things to do are marked by "[gps]"
60END TODO -->
61
62
63<h1>dynamic_bitset&lt;Block, Allocator&gt;</h1>
64
65<h2>Contents</h2>
66
67<dl class="index">
68<dt><a href="#description">Description</a></dt>
69
70<dt><a href="#synopsis">Synopsis</a></dt>
71
72<dt><a href="#definitions">Definitions</a></dt>
73
74<dt><a href="#examples">Examples</a></dt>
75
76<dt><a href="#rationale">Rationale</a></dt>
77
78<dt><a href="#header-files">Header Files</a></dt>
79
80<dt><a href="#template-parameters">Template Parameters</a></dt>
81
82<dt><a href="#concepts-modeled">Concepts modeled</a></dt>
83
84<dt><a href="#type-requirements">Type requirements</a></dt>
85
86<dt><a href="#public-base-classes">Public base classes</a></dt>
87
88<dt><a href="#nested-type-names">Nested type names</a></dt>
89
90<dt><a href="#public-data-members">Public data members</a></dt>
91
92<dt><a href="#constructors">Constructors</a></dt>
93
94<dt><a href="#destructor">Destructor</a></dt>
95
96<dt><a href="#member-functions">Member functions</a></dt>
97
98<dt><a href="#non-member-functions">Non-member functions</a></dt>
99
100<dt><a href="#exception-guarantees">Exception guarantees</a></dt>
101
102<dt><a href="#changes-from-previous-ver"><b>Changes from previous version(s)</b></a></dt>
103
104<dt><a href="#see-also">See also</a></dt>
105
106<dt><a href="#acknowledgements">Acknowledgements</a></dt>
107</dl>
108
109<h3><a name="description">Description</a></h3>
110
111<p>The <tt>dynamic_bitset</tt> class represents a set of bits. It
112provides accesses to the value of individual bits via an
113<tt>operator[]</tt> and provides all of the bitwise operators
114that one can apply to builtin integers, such as
115<tt>operator&amp;</tt> and <tt>operator&lt;&lt;</tt>. The number
116of bits in the set is specified at runtime via a parameter to the
117constructor of the <tt>dynamic_bitset</tt>.</p>
118
119<p>The <tt>dynamic_bitset</tt> class is nearly identical to the
120<a href=
121"http://www.sgi.com/tech/stl/bitset.html"><tt>std::bitset</tt></a>
122class. The difference is that the size of the
123<tt>dynamic_bitset</tt> (the number of bits) is specified at
124run-time during the construction of a <tt>dynamic_bitset</tt>
125object, whereas the size of a <tt>std::bitset</tt> is specified
126at compile-time through an integer template parameter.</p>
127
128<p>The main problem that <tt>dynamic_bitset</tt> is designed to
129solve is that of representing a subset of a finite set. Each bit
130represents whether an element of the finite set is in the subset
131or not. As such the bitwise operations of
132<tt>dynamic_bitset</tt>, such as <tt>operator&amp;</tt> and
133<tt>operator|</tt>, correspond to set operations, such as
134intersection and union.</p>
135
136<h3><a name="synopsis">Synopsis</a></h3>
137
138<pre>
139namespace boost {
140
141template &lt;typename Block, typename Allocator&gt;
142class dynamic_bitset
143{
144public:
145    typedef Block <a href="#block_type">block_type</a>;
146    typedef Allocator <a href="#allocator_type">allocator_type</a>;
147    typedef <i>implementation-defined</i> <a href="#size_type">size_type</a>;
148       
149    static const int <a href=
150       "#bits_per_block">bits_per_block</a> = <i>implementation-defined</i>;
151    static const size_type <a href=
152          "#npos">npos</a> = <i>implementation-defined</i>;
153
154    class <a href="#reference">reference</a>
155    {
156        void operator&amp;(); // not defined
157    public:
158        // An automatically generated copy constructor.
159
160        reference&amp; operator=(bool value);
161        reference&amp; operator=(const reference&amp; rhs);
162
163        reference&amp; operator|=(bool value);
164        reference&amp; operator&amp;=(bool value);
165        reference&amp; operator^=(bool value);
166        reference&amp; operator-=(bool value);
167
168        bool operator~() const;
169        operator bool() const;
170        reference&amp; flip();
171    };
172    typedef bool <a href="#const_reference">const_reference</a>;
173
174    explicit <a href=
175"#cons1">dynamic_bitset</a>(const Allocator&amp; alloc = Allocator());
176
177    explicit <a href=
178"#cons2">dynamic_bitset</a>(size_type num_bits, unsigned long value = 0,
179                            const Allocator&amp; alloc = Allocator());
180
181    template &lt;typename CharT, typename Traits, typename Alloc&gt;
182    explicit <a href=
183"#cons3">dynamic_bitset</a>(const std::basic_string&lt;CharT, Traits, Alloc&gt;&amp; s,
184        typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type pos = 0,
185        typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type n = std::basic_string&lt;CharT, Traits, Alloc&gt;::npos,
186        const Allocator&amp; alloc = Allocator());
187
188    template &lt;typename BlockInputIterator&gt;
189    <a href=
190"#cons4">dynamic_bitset</a>(BlockInputIterator first, BlockInputIterator last,
191                   const Allocator&amp; alloc = Allocator());
192
193    <a href=
194"#cons5">dynamic_bitset</a>(const dynamic_bitset&amp; b);
195
196    void <a href="#swap">swap</a>(dynamic_bitset&amp; b);
197
198    dynamic_bitset&amp; <a href=
199"#assign">operator=</a>(const dynamic_bitset&amp; b);
200
201    allocator_type <a href="#get_allocator">get_allocator()</a> const;
202
203    void <a href=
204"#resize">resize</a>(size_type num_bits, bool value = false);
205    void <a href="#clear">clear</a>();
206    void <a href="#push_back">push_back</a>(bool bit);
207    void <a href="#append1">append</a>(Block block);
208    template &lt;typename BlockInputIterator&gt;
209    void <a href=
210"#append2">append</a>(BlockInputIterator first, BlockInputIterator last);
211
212    dynamic_bitset&amp; <a href=
213"#op-and-assign">operator&amp;=</a>(const dynamic_bitset&amp; b);
214    dynamic_bitset&amp; <a href=
215"#op-or-assign">operator|=</a>(const dynamic_bitset&amp; b);
216    dynamic_bitset&amp; <a href=
217"#op-xor-assign">operator^=</a>(const dynamic_bitset&amp; b);
218    dynamic_bitset&amp; <a href=
219"#op-sub-assign">operator-=</a>(const dynamic_bitset&amp; b);
220    dynamic_bitset&amp; <a href=
221"#op-sl-assign">operator&lt;&lt;=</a>(size_type n);
222    dynamic_bitset&amp; <a href=
223"#op-sr-assign">operator&gt;&gt;=</a>(size_type n);
224    dynamic_bitset <a href=
225"#op-sl">operator&lt;&lt;</a>(size_type n) const;
226    dynamic_bitset <a href=
227"#op-sr">operator&gt;&gt;</a>(size_type n) const;
228
229    dynamic_bitset&amp; <a href=
230"#set2">set</a>(size_type n, bool val = true);
231    dynamic_bitset&amp; <a href="#set1">set</a>();
232    dynamic_bitset&amp; <a href="#reset2">reset</a>(size_type n);
233    dynamic_bitset&amp; <a href="#reset1">reset</a>();
234    dynamic_bitset&amp; <a href="#flip2">flip</a>(size_type n);
235    dynamic_bitset&amp; <a href="#flip1">flip</a>();
236    bool <a href="#test">test</a>(size_type n) const;
237    bool <a href="#any">any</a>() const;
238    bool <a href="#none">none</a>() const;
239    dynamic_bitset <a href="#op-not">operator~</a>() const;
240    size_type <a href="#count">count</a>() const;
241
242    reference <a href=
243"#bracket">operator[]</a>(size_type pos);
244    bool <a href=
245"#const-bracket">operator[]</a>(size_type pos) const;
246
247    unsigned long <a href="#to_ulong">to_ulong</a>() const;
248
249    size_type <a href="#size">size</a>() const;
250    size_type <a href="#num_blocks">num_blocks</a>() const;
251    size_type <a href="#max_size">max_size</a>() const;
252    bool <a href="#empty">empty</a>() const;
253
254    bool <a href=
255"#is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const;
256    bool <a href=
257"#is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const;
258
259    size_type <a href="#find_first">find_first</a>() const;
260    size_type <a href="#find_next">find_next</a>(size_type pos) const;
261
262
263
264};
265
266template &lt;typename B, typename A&gt;
267bool <a href=
268"#op-equal">operator==</a>(const dynamic_bitset&lt;B, A&gt;&amp; a, const dynamic_bitset&lt;B, A&gt;&amp; b);
269
270template &lt;typename Block, typename Allocator&gt;
271bool <a href=
272"#op-not-equal">operator!=</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; a, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
273
274template &lt;typename B, typename A&gt;
275bool <a href=
276"#op-less">operator&lt;</a>(const dynamic_bitset&lt;B, A&gt;&amp; a, const dynamic_bitset&lt;B, A&gt;&amp; b);
277
278template &lt;typename Block, typename Allocator&gt;
279bool <a href=
280"#op-less-equal">operator&lt;=</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; a, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
281
282template &lt;typename Block, typename Allocator&gt;
283bool <a href=
284"#op-greater">operator&gt;</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; a, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
285
286template &lt;typename Block, typename Allocator&gt;
287bool <a href=
288"#op-greater-equal">operator&gt;=</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; a, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
289
290template &lt;typename Block, typename Allocator&gt;
291dynamic_bitset&lt;Block, Allocator&gt;
292<a href=
293"#op-and">operator&amp;</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b1, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b2);
294
295template &lt;typename Block, typename Allocator&gt;
296dynamic_bitset&lt;Block, Allocator&gt;
297<a href=
298"#op-or">operator|</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b1, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b2);
299
300template &lt;typename Block, typename Allocator&gt;
301dynamic_bitset&lt;Block, Allocator&gt;
302<a href=
303"#op-xor">operator^</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b1, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b2);
304
305template &lt;typename Block, typename Allocator&gt;
306dynamic_bitset&lt;Block, Allocator&gt;
307<a href=
308"#op-sub">operator-</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b1, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b2);
309
310template &lt;typename Block, typename Allocator, typename CharT, typename Alloc&gt;
311void <a href=
312"#to_string">to_string</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b,
313          std::basic_string&lt;CharT, Alloc&gt;&amp; s);
314
315template &lt;typename Block, typename Allocator, typename BlockOutputIterator&gt;
316void <a href=
317"#to_block_range">to_block_range</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b,
318                    BlockOutputIterator result);
319
320template &lt;typename CharT, typename Traits, typename Block, typename Allocator&gt;
321std::basic_ostream&lt;CharT, Traits&gt;&amp;
322<a href=
323"#op-out">operator&lt;&lt;</a>(std::basic_ostream&lt;CharT, Traits&gt;&amp; os, const dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
324
325template &lt;typename CharT, typename Traits, typename Block, typename Allocator&gt;
326std::basic_istream&lt;CharT, Traits&gt;&amp;
327<a href=
328"#op-in">operator&gt;&gt;</a>(std::basic_istream&lt;CharT, Traits&gt;&amp; is, dynamic_bitset&lt;Block, Allocator&gt;&amp; b);
329
330} // namespace boost
331</pre>
332
333<h3><a name="definitions">Definitions</a></h3>
334
335<p>Each bit represents either the Boolean value true or false (1
336or 0). To <i>set</i> a bit is to assign it 1. To <i>clear</i> or
337<i>reset</i> a bit is to assign it 0. To <i>flip</i> a bit is to
338change the value to 1 if it was 0 and to 0 if it was 1. Each bit
339has a non-negative <i>position</i>. A bitset <tt>x</tt> contains
340<tt>x.size()</tt> bits, with each bit assigned a unique position
341in the range <tt>[0,x.size())</tt>. The bit at position 0 is
342called the <i>least significant bit</i> and the bit at position
343<tt>size() - 1</tt> is the <i>most significant bit</i>. When
344converting an instance of <tt>dynamic_bitset</tt> to or from an
345unsigned long <tt>n</tt>, the bit at position <tt>i</tt> of the
346bitset has the same value as <tt>(n &gt;&gt; i) &amp; 1</tt>.</p>
347
348<h3><a name="examples">Examples</a></h3>
349
350<p>An example of setting and reading some bits. Note that
351<tt>operator[]</tt> goes from the least-significant bit at
352<tt>0</tt> to the most significant bit at <tt>size()-1</tt>. The
353<tt>operator&lt;&lt;</tt> for <tt>dynamic_bitset</tt> prints the
354bitset from most-significant to least-significant, since that is
355the format most people are use to reading.</p>
356
357<blockquote>
358<pre>
359#include &lt;iostream&gt;
360#include &lt;boost/dynamic_bitset.hpp&gt;
361int main(int, char*[]) {
362  boost::dynamic_bitset&lt;&gt; x(5); // all 0's by default
363  x[0] = 1;
364  x[1] = 1;
365  x[4] = 1;
366  for (boost::dynamic_bitset&lt;&gt;::size_type i = 0; i &lt; x.size(); ++i)
367    std::cout &lt;&lt; x[i];
368  std::cout &lt;&lt; "\n";
369  std::cout &lt;&lt; x &lt;&lt; "\n";
370  return EXIT_SUCCESS;
371}
372</pre>
373</blockquote>
374
375<p>The output is</p>
376
377<blockquote>
378<pre>
37911001
38010011
381</pre>
382</blockquote>
383
384<p>An example of creating some bitsets from integers (unsigned
385longs).</p>
386
387<blockquote>
388<pre>
389#include &lt;iostream&gt;
390#include &lt;boost/dynamic_bitset.hpp&gt;
391int main(int, char*[])
392{
393  const boost::dynamic_bitset&lt;&gt; b0(2, 0ul);
394  std::cout &lt;&lt; "bits(0) = " &lt;&lt; b0 &lt;&lt; std::endl;
395
396  const boost::dynamic_bitset&lt;&gt; b1(2, 1ul);
397  std::cout &lt;&lt; "bits(1) = " &lt;&lt; b1 &lt;&lt; std::endl;
398
399  const boost::dynamic_bitset&lt;&gt; b2(2, 2ul);
400  std::cout &lt;&lt; "bits(2) = " &lt;&lt; b2 &lt;&lt; std::endl;
401
402  const boost::dynamic_bitset&lt;&gt; b3(2, 3ul);
403  std::cout &lt;&lt; "bits(3) = " &lt;&lt; b3 &lt;&lt; std::endl;
404
405  return EXIT_SUCCESS;
406}
407</pre>
408</blockquote>
409
410<p>The output is</p>
411
412<blockquote>
413<pre>
414bits(0) = 00
415bits(1) = 01
416bits(2) = 10
417bits(3) = 11
418</pre>
419</blockquote>
420
421<p>An example of performing some bitwise operations.</p>
422
423<blockquote>
424<pre>
425#include &lt;iostream&gt;
426#include &lt;boost/dynamic_bitset.hpp&gt;
427int main(int, char*[]) {
428  const boost::dynamic_bitset&lt;&gt; mask(12, 2730ul);
429  std::cout &lt;&lt; "mask = " &lt;&lt; mask &lt;&lt; std::endl;
430
431  boost::dynamic_bitset&lt;&gt; x(12);
432
433  std::cout &lt;&lt; "Enter a 12-bit bitset in binary: " &lt;&lt; std::flush;
434  if (std::cin &gt;&gt; x) {
435    std::cout &lt;&lt; "input number:     " &lt;&lt; x &lt;&lt; std::endl;
436    std::cout &lt;&lt; "As unsigned long: " &lt;&lt; x.to_ulong() &lt;&lt; std::endl;
437    std::cout &lt;&lt; "And with mask:    " &lt;&lt; (x &amp; mask) &lt;&lt; std::endl;
438    std::cout &lt;&lt; "Or with mask:     " &lt;&lt; (x | mask) &lt;&lt; std::endl;
439    std::cout &lt;&lt; "Shifted left:     " &lt;&lt; (x &lt;&lt; 1) &lt;&lt; std::endl;
440    std::cout &lt;&lt; "Shifted right:    " &lt;&lt; (x &gt;&gt; 1) &lt;&lt; std::endl;
441  }
442  return EXIT_SUCCESS;
443}
444</pre>
445</blockquote>
446
447<p>The output is</p>
448
449<blockquote>
450<pre>
451mask = 101010101010
452Enter a 12-bit bitset in binary: 100110101101
453input number =    100110101101
454As unsigned long: 2477
455And with mask:    100010101000
456Or with mask:     101110101111
457Shifted left:     001101011010
458Shifted right:    010011010110
459</pre>
460</blockquote>
461
462<h3><a name="rationale">Rationale</a></h3>
463
464The <tt>dynamic_bitset</tt> does not provide iterators (and
465therefore is not a <a href=
466"http://www.sgi.com/tech/stl/Container.html">Container</a>) for
467the following reasons:
468
469<ol>
470<li><tt>std::bitset</tt> does not have iterators, and
471<tt>dynamic_bitset</tt> is meant to be a run-time sized version
472of <tt>std::bitset</tt>.</li>
473
474<li>The <tt>dynamic_bitset</tt> is not designed to be a <a href=
475"http://www.sgi.com/tech/stl/Container.html">Container</a>.</li>
476
477<li>A container with a proxy <tt>reference</tt> type can not
478fulfill the container requirements as specified in the C++
479standard (unless one resorts to strange iterator semantics).
480<tt>std::vector&lt;bool&gt;</tt> has a proxy <tt>reference</tt>
481type and does not fulfill the container requirements and as a
482result has caused many problems. One common problem is when
483people try to use iterators from <tt>std::vector&lt;bool&gt;</tt>
484with a Standard algorithm such as <tt>std::search</tt>. The
485<tt>std::search</tt> requirements say that the iterator must be a
486<a href=
487"http://www.sgi.com/tech/stl/ForwardIterator.html">Forward
488Iterator</a>, but the <tt>std::vector&lt;bool&gt;::iterator</tt>
489does not meet this requirement because of the proxy reference.
490Depending on the implementation, they may or not be a compile
491error or even a run-time error due to this misuse. For further
492discussion of the problem see <i>Effective STL</i> by Scott
493Meyers). So <tt>dynamic_bitset</tt> tries to avoid these problems
494by not pretending to be a container.</li>
495</ol>
496
497<p>Some people prefer the name "toggle" to "flip". The name
498"flip" was chosen because that is the name used in <a href=
499"http://www.sgi.com/tech/stl/bitset.html"><tt>std::bitset</tt></a>.
500In fact, most of the function names for <tt>dynamic_bitset</tt>
501were chosen for this reason.</p>
502
503<p><tt>dynamic_bitset</tt> does not throw exceptions when a
504precondition is violated (as is done in <tt>std::bitset</tt>).
505Instead <tt>assert</tt> is used. See the guidelines for <a href=
506"../../more/error_handling.html">Error and Exception Handling</a>
507for the explanation.</p>
508
509<h3><a name="header-files">Header Files</a></h3>
510
511<p>The class <tt>dynamic_bitset</tt> is defined in the header <a
512href=
513"../../boost/dynamic_bitset.hpp">boost/dynamic_bitset.hpp</a>.
514Also, there is a forward declaration for <tt>dynamic_bitset</tt>
515in the header <a href=
516"../../boost/dynamic_bitset_fwd.hpp">boost/dynamic_bitset_fwd.hpp</a>.</p>
517
518<h3><a name="template-parameters">Template parameters</a></h3>
519
520<table border summary=
521"Describes the meaning of the template parameters and lists their corresponding default arguments">
522<tr>
523<th>Parameter</th>
524<th>Description</th>
525<th>Default</th>
526</tr>
527
528<tr>
529<td valign="top"><tt>Block</tt> </td>
530<td valign="top">The integer type in which the bits are
531stored.</td>
532<td valign="top"><tt>unsigned long</tt> </td>
533</tr>
534
535<tr>
536<td valign="top"><tt>Allocator</tt> </td>
537<td valign="top">The allocator type used for all internal memory
538management.</td>
539<td valign="top"><tt>std::allocator&lt;Block&gt;</tt> </td>
540</tr>
541</table>
542
543<h3><a name="concepts-modeled">Concepts Modeled</a></h3>
544
545<a href=
546"http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>, <a
547href=
548"http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
549Constructible</a>, <a href=
550"http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
551Comparable</a>, <a href=
552"http://www.sgi.com/tech/stl/LessThanComparable.html">LessThan
553Comparable</a>.
554
555<h3><a name="type-requirements">Type requirements</a></h3>
556
557<tt>Block</tt> is an unsigned integer type. <tt>Allocator</tt>
558satisfies the Standard requirements for an allocator.
559
560<h3><a name="public-base-classes">Public base classes</a></h3>
561
562None.
563
564<h3><a name="nested-type-names">Nested type names</a></h3>
565
566<hr>
567<pre>
568<a name="reference">dynamic_bitset::reference</a>
569</pre>
570
571<p>A proxy class that acts as a reference to a single bit. It
572contains an assignment operator, a conversion to <tt>bool</tt>,
573an <tt>operator~</tt>, and a member function <tt>flip</tt>. It
574exists only as a helper class for <tt>dynamic_bitset</tt>'s
575<tt>operator[]</tt>. The following table describes the valid
576operations on the <tt>reference</tt> type. Assume that <tt>b</tt>
577is an instance of <tt>dynamic_bitset</tt>, <tt>i, j</tt> are of
578<tt>size_type</tt> and in the range <tt>[0,b.size())</tt>. Also,
579note that when we write <tt>b[i]</tt> we mean an object of type
580<tt>reference</tt> that was initialized from <tt>b[i]</tt>. The
581variable <tt>x</tt> is a <tt>bool</tt>.</p>
582
583<table border="1" summary=
584"Semantics of several expressions involving usage of dynamic_bitset::reference">
585<tr>
586<th>Expression</th>
587<th>Semantics</th>
588</tr>
589
590<tr>
591<td><tt>x = b[i]</tt></td>
592<td>Assign the ith bit of <tt>b</tt> to <tt>x</tt>.</td>
593</tr>
594
595<tr>
596<td><tt>(bool)b[i]</tt></td>
597<td>Return the ith bit of <tt>b</tt>.</td>
598</tr>
599
600<tr>
601<td><tt>b[i] = x</tt></td>
602<td>Set the ith bit of <tt>b</tt> to the value of <tt>x</tt> and
603return <tt>b[i]</tt>.</td>
604</tr>
605
606<tr>
607<td><tt>b[i] |= x</tt></td>
608<td>Or the ith bit of <tt>b</tt> with the value of <tt>x</tt> and
609return <tt>b[i]</tt>.</td>
610</tr>
611
612<tr>
613<td><tt>b[i] &amp;= x</tt></td>
614<td>And the ith bit of <tt>b</tt> with the value of <tt>x</tt>
615and return <tt>b[i]</tt>.</td>
616</tr>
617
618<tr>
619<td><tt>b[i] ^= x</tt></td>
620<td>Exclusive-Or the ith bit of <tt>b</tt> with the value of
621<tt>x</tt> and return <tt>b[i]</tt>.</td>
622</tr>
623
624<tr>
625<td><tt>b[i] -= x</tt></td>
626<td>If <tt>x==true</tt>, clear the ith bit of <tt>b</tt>. Returns
627<tt>b[i]</tt>.</td>
628</tr>
629
630<tr>
631<td><tt>b[i] = b[j]</tt></td>
632<td>Set the ith bit of <tt>b</tt> to the value of the jth bit of
633<tt>b</tt> and return <tt>b[i]</tt>.</td>
634</tr>
635
636<tr>
637<td><tt>b[i] |= b[j]</tt></td>
638<td>Or the ith bit of <tt>b</tt> with the jth bit of <tt>b</tt>
639and return <tt>b[i]</tt>.</td>
640</tr>
641
642<tr>
643<td><tt>b[i] &amp;= b[j]</tt></td>
644<td>And the ith bit of <tt>b</tt> with the jth bit of <tt>b</tt>
645and return <tt>b[i]</tt>.</td>
646</tr>
647
648<tr>
649<td><tt>b[i] ^= b[j]</tt></td>
650<td>Exclusive-Or the ith bit of <tt>b</tt> with the jth bit of
651<tt>b</tt> and return <tt>b[i]</tt>.</td>
652</tr>
653
654<tr>
655<td><tt>b[i] -= b[j]</tt></td>
656<td>If the jth bit of <tt>b</tt> is set, clear the ith bit of
657<tt>b</tt>. Returns <tt>b[i]</tt>.</td>
658</tr>
659
660<tr>
661<td><tt>x = ~b[i]</tt></td>
662<td>Assign the opposite of the ith bit of <tt>b</tt> to
663<tt>x</tt>.</td>
664</tr>
665
666<tr>
667<td><tt>(bool)~b[i]</tt></td>
668<td>Return the opposite of the ith bit of <tt>b</tt>.</td>
669</tr>
670
671<tr>
672<td><tt>b[i].flip()</tt> </td>
673<td>Flip the ith bit of <tt>b</tt> and return <tt>b[i]</tt>.</td>
674</tr>
675</table>
676
677<hr>
678<pre>
679<a name="const_reference">dynamic_bitset::const_reference</a>
680</pre>
681
682The type <tt>bool</tt>.
683
684<hr>
685<pre>
686<a name="size_type">dynamic_bitset::size_type</a>
687</pre>
688
689The unsigned integer type for representing the size of the bit set.
690
691<hr>
692<pre>
693<a name="block_type">dynamic_bitset::block_type</a>
694</pre>
695
696The same type as <tt>Block</tt>.
697
698<hr>
699<pre>
700<a name="allocator_type">dynamic_bitset::allocator_type;</a>
701</pre>
702
703The same type as <tt>Allocator</tt>.
704
705<hr>
706<h3><a name="public-data-members">Public data members</a></h3>
707
708<hr>
709<pre>
710<a name="bits_per_block">dynamic_bitset::bits_per_block</a>
711</pre>
712
713The number of bits the type <tt>Block</tt> uses to represent values,
714excluding any padding bits. Numerically equal
715to <tt>std::numeric_limits&lt;Block&gt;::digits</tt>.
716
717<hr>
718<pre>
719<a name="npos">dynamic_bitset::npos</a>
720</pre>
721
722The maximum value of <tt>size_type</tt>. [gps]
723
724<hr>
725<h3><a name="constructors">Constructors</a></h3>
726
727<hr>
728<pre>
729<a name=
730"cons1">dynamic_bitset</a>(const Allocator&amp; alloc = Allocator())
731</pre>
732
733<b>Effects:</b> Constructs a bitset of size zero. A copy of the
734<tt>alloc</tt> object will be used in subsequent bitset
735operations such as <tt>resize</tt> to allocate memory.<br>
736 <b>Postconditions:</b> <tt>this-&gt;size() == 0</tt>.<br>
737 <b>Throws:</b> An allocation error if memory is exhausted
738(<tt>std::bad_alloc</tt> if
739<tt>Allocator=std::allocator</tt>).<br>
740 (Required by <a href=
741"http://www.sgi.com/tech/stl/DefaultConstructible.html">Default
742Constructible</a>.)
743
744<hr>
745<pre>
746<a name="cons2">dynamic_bitset</a>(size_type num_bits,
747               unsigned long value = 0,
748               const Allocator&amp; alloc = Allocator())
749</pre>
750
751<b>Effects:</b> Constructs a bitset from an integer. The first
752<tt>M</tt> bits are initialized to the corresponding bits in
753<tt>val</tt> and all other bits, if any, to zero (where <tt>M =
754min(num_bits, std::numeric_limits&lt;unsigned long&gt;::digits)</tt>). A copy of
755the <tt>alloc</tt> object will be used in subsequent bitset
756operations such as <tt>resize</tt> to allocate memory.<br>
757 <b>Postconditions:</b>
758
759<ul>
760<li><tt>this-&gt;size() == num_bits</tt></li>
761
762<li>For all <tt>i</tt> in the range <tt>[0,M)</tt>,
763<tt>(*this)[i] == (value &gt;&gt; i) &amp; 1</tt>.</li>
764
765<li>For all <tt>i</tt> in the range <tt>[M,num_bits)</tt>,
766<tt>(*this)[i] == false</tt>.</li>
767</ul>
768
769<b>Throws:</b> An allocation error if memory is exhausted
770(<tt>std::bad_alloc</tt> if
771<tt>Allocator=std::allocator</tt>).<br>
772
773
774<hr>
775<pre>
776<a name="cons5">dynamic_bitset</a>(const dynamic_bitset&amp; x)
777</pre>
778
779<b>Effects:</b> Constructs a bitset that is a copy of the bitset
780<tt>x</tt>. The allocator for this bitset is a copy of the
781allocator in <tt>x</tt>. <br>
782 <b>Postconditions:</b> For all <tt>i</tt> in the range
783<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br>
784 <b>Throws:</b> An allocation error if memory is exhausted
785(<tt>std::bad_alloc</tt> if
786<tt>Allocator=std::allocator</tt>).<br>
787 (Required by <a href=
788"http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.)
789
790<hr>
791<pre>
792template &lt;typename BlockInputIterator&gt;
793explicit
794<a name=
795"cons4">dynamic_bitset</a>(BlockInputIterator first, BlockInputIterator last,
796               const Allocator&amp; alloc = Allocator());
797</pre>
798
799<b>Effects:</b> Constructs a bitset based on a range of blocks.
800Let <tt>*first</tt> be block number 0, <tt>*++first</tt> block
801number 1, etc. Block number <tt>b</tt> is used to initialize the
802bits of the dynamic_bitset in the position range
803<tt>[b*bits_per_block, (b+1)*bits_per_block)</tt>. For each block
804number <tt>b</tt> with value <tt>bval</tt>, the bit <tt>(bval
805&gt;&gt; i) &amp; 1</tt> corresponds to the bit at position
806<tt>(b * bits_per_block + i)</tt> in the bitset (where <tt>i</tt>
807goes through the range <tt>[0, bits_per_block)</tt>).<br>
808 <b>Requires:</b> The type <tt>BlockInputIterator</tt> must be a
809model of <a href=
810"http://www.sgi.com/tech/stl/InputIterator.html">Input
811Iterator</a> and its <tt>value_type</tt> must be the same type as
812<tt>Block</tt>.<br>
813 <b>Throws:</b> An allocation error if memory is exhausted
814(<tt>std::bad_alloc</tt> if
815<tt>Allocator=std::allocator</tt>).<br>
816
817
818<hr>
819<pre>
820template&lt;typename Char, typename Traits, typename Alloc&gt;
821explicit
822<a name="cons3">dynamic_bitset</a>(const <a href=
823"http://www.sgi.com/tech/stl/basic_string.html">std::basic_string</a>&lt;Char,Traits,Alloc&gt;&amp; s,
824               typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type pos = 0,
825               typename std::basic_string&lt;CharT, Traits, Alloc&gt;::size_type n = <a
826 href=
827"http://www.sgi.com/tech/stl/basic_string.html">std::basic_string</a>&lt;Char,Traits,Alloc&gt;::npos,
828               const Allocator&amp; alloc = Allocator())
829</pre>
830
831<b>Precondition:</b> <tt>pos &lt;= s.size()</tt> and the
832characters used to initialize the bits must be <tt>0</tt> or
833<tt>1</tt>.<br>
834 <b>Effects:</b> Constructs a bitset from a string of 0's and
8351's. The first <tt>M</tt> bits are initialized to the
836corresponding characters in <tt>s</tt>, where <tt>M =
837min(s.size() - pos, n)</tt>. Note that the <i>highest</i>
838character position in <tt>s</tt>, not the lowest, corresponds to
839the least significant bit. That is, character position <tt>pos +
840M - 1 - i</tt> corresponds to bit <tt>i</tt>. So, for example,
841<tt>dynamic_bitset(string("1101"))</tt> is the same as
842<tt>dynamic_bitset(13ul)</tt>.<br>
843 <b>Throws:</b> an allocation error if memory is exhausted
844(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
845
846<hr>
847<h3><a name="destructor">Destructor</a></h3>
848
849<hr>
850<pre>
851~dynamic_bitset()
852</pre>
853
854<b>Effects:</b> Releases the memory associated with this bitset
855and destroys the bitset object itself.<br>
856 <b>Throws:</b> nothing.
857
858<hr>
859<h3><a name="member-functions">Member Functions</a></h3>
860
861<hr>
862<pre>
863void <a name="swap">swap</a>(dynamic_bitset&amp; b);
864</pre>
865
866<b>Effects:</b> The contents of this bitset and bitset <tt>b</tt>
867are exchanged.<br>
868<b>Postconditions:</b> This bitset is equal to the original
869<tt>b</tt>, and <tt>b</tt> is equal to the previous version of
870this bitset.<br>
871<b>Throws:</b> nothing.
872
873<hr>
874<pre>
875dynamic_bitset&amp; <a name=
876"assign">operator=</a>(const dynamic_bitset&amp; x)
877</pre>
878
879<b>Effects:</b> This bitset becomes a copy of the bitset
880<tt>x</tt>.<br>
881 <b>Postconditions:</b> For all <tt>i</tt> in the range
882<tt>[0,x.size())</tt>, <tt>(*this)[i] == x[i]</tt>.<br>
883 <b>Returns:</b> <tt>*this</tt>.<br>
884 <b>Throws:</b> nothing. <br>
885(Required by <a href=
886"http://www.sgi.com/tech/stl/Assignable.html">Assignable</a>.)
887
888<hr>
889<pre>
890allocator_type <a name="get_allocator">get_allocator()</a> const;
891</pre>
892 <b>Returns:</b> A copy of the allocator object used to construct <tt>*this</tt>.
893
894<hr>
895<pre>
896void <a name=
897"resize">resize</a>(size_type num_bits, bool value = false);
898</pre>
899
900<b>Effects:</b> Changes the number of bits of the bitset to
901<tt>num_bits</tt>. If <tt>num_bits &gt; size()</tt> then the bits
902in the range <tt>[0,size())</tt> remain the same, and the bits in
903<tt>[size(),num_bits)</tt> are all set to <tt>value</tt>. If
904<tt>num_bits &lt; size()</tt> then the bits in the range
905<tt>[0,num_bits)</tt> stay the same (and the remaining bits are
906discarded).<br>
907 <b>Postconditions:</b> <tt>this-&gt;size() == num_bits</tt>.<br>
908 <b>Throws:</b> An allocation error if memory is exhausted
909(<tt>std::bad_alloc</tt> if
910<tt>Allocator=std::allocator</tt>).<br>
911
912
913<hr>
914<pre>
915void <a name="clear">clear</a>()
916</pre>
917
918<b>Effects:</b> The size of the bitset becomes zero.<br>
919 <b>Throws:</b> nothing.
920
921<hr>
922<pre>
923void <a name="push_back">push_back</a>(bool value);
924</pre>
925
926<b>Effects:</b> Increases the size of the bitset by one, and sets
927the value of the new most-significant bit to <tt>value</tt>.<br>
928 <b>Throws:</b> An allocation error if memory is exhausted
929(<tt>std::bad_alloc</tt> if
930<tt>Allocator=std::allocator</tt>).<br>
931
932
933<hr>
934<pre>
935void <a name="append1">append</a>(Block value);
936</pre>
937
938<b>Effects:</b> Appends the bits in <tt>value</tt> to the bitset
939(appends to the most-significant end). This increases the size of
940the bitset by <tt>bits_per_block</tt>. Let <tt>s</tt> be the old
941size of the bitset, then for <tt>i</tt> in the range
942<tt>[0,bits_per_block)</tt>, the bit at position <tt>(s + i)</tt>
943is set to <tt>((value &gt;&gt; i) &amp; 1)</tt>.<br>
944 <b>Throws:</b> An allocation error if memory is exhausted
945(<tt>std::bad_alloc</tt> if
946<tt>Allocator=std::allocator</tt>).<br>
947
948
949<hr>
950<pre>
951template &lt;typename BlockInputIterator&gt;
952void <a name=
953"append2">append</a>(BlockInputIterator first, BlockInputIterator last);
954</pre>
955
956<b>Effects:</b> This function provides the same end result as the
957following code, but is typically more efficient. [gps]
958
959<pre>
960for (; first != last; ++first)
961  append(*first);
962</pre>
963
964<b>Requires:</b> The <tt>BlockInputIterator</tt> type must be a
965model of <a href=
966"http://www.sgi.com/tech/stl/InputIterator.html">Input
967Iterator</a> and the <tt>value_type</tt> must be the same type as
968<tt>Block</tt>.<br>
969 <b>Throws:</b> An allocation error if memory is exhausted
970(<tt>std::bad_alloc</tt> if
971<tt>Allocator=std::allocator</tt>).<br>
972
973
974<hr>
975<pre>
976dynamic_bitset&amp; <a name=
977"op-and-assign">operator&amp;=</a>(const dynamic_bitset&amp; rhs)
978</pre>
979
980<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
981 <b>Effects:</b> Bitwise-AND all the bits in <tt>rhs</tt> with
982the bits in this bitset. This is equivalent to:
983
984<pre>
985for (size_type i = 0; i != this-&gt;size(); ++i)
986  (*this)[i] = (*this)[i] &amp; rhs[i];
987</pre>
988
989<b>Returns:</b> <tt>*this</tt>.<br>
990 <b>Throws:</b> nothing.
991
992<hr>
993<pre>
994dynamic_bitset&amp; <a name=
995"op-or-assign">operator|=</a>(const dynamic_bitset&amp; rhs)
996</pre>
997
998<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
999 <b>Effects:</b> Bitwise-OR's all the bits in <tt>rhs</tt> with
1000the bits in this bitset. This is equivalent to:
1001
1002<pre>
1003for (size_type i = 0; i != this-&gt;size(); ++i)
1004  (*this)[i] = (*this)[i] | rhs[i];
1005</pre>
1006
1007<b>Returns:</b> <tt>*this</tt>.<br>
1008 <b>Throws:</b> nothing.
1009
1010<hr>
1011<pre>
1012dynamic_bitset&amp; <a name=
1013"op-xor-assign">operator^=</a>(const dynamic_bitset&amp; rhs)
1014</pre>
1015
1016<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
1017 <b>Effects:</b> Bitwise-XOR's all the bits in <tt>rhs</tt> with
1018the bits in this bitset. This is equivalent to:
1019
1020<pre>
1021for (size_type i = 0; i != this-&gt;size(); ++i)
1022  (*this)[i] = (*this)[i] ^ rhs[i];
1023</pre>
1024
1025<b>Returns:</b> <tt>*this</tt>.<br>
1026 <b>Throws:</b> nothing.
1027
1028<hr>
1029<pre>
1030dynamic_bitset&amp; <a name=
1031"op-sub-assign">operator-=</a>(const dynamic_bitset&amp; rhs)
1032</pre>
1033
1034<b>Requires:</b> <tt>this-&gt;size() == rhs.size()</tt>.<br>
1035 <b>Effects:</b> Computes the set difference of this bitset and
1036the <tt>rhs</tt> bitset. This is equivalent to:
1037
1038<pre>
1039for (size_type i = 0; i != this-&gt;size(); ++i)
1040  (*this)[i] = (*this)[i] &amp;&amp; !rhs[i];
1041</pre>
1042
1043<b>Returns:</b> <tt>*this</tt>.<br>
1044 <b>Throws:</b> nothing.
1045
1046<hr>
1047<pre>
1048dynamic_bitset&amp; <a name=
1049"op-sl-assign">operator&lt;&lt;=</a>(size_type n)
1050</pre>
1051
1052<b>Effects:</b> Shifts the bits in this bitset to the left by
1053<tt>n</tt> bits. For each bit in the bitset, the bit at position
1054pos takes on the previous value of the bit at position <tt>pos -
1055n</tt>, or zero if no such bit exists.<br>
1056 <b>Returns:</b> <tt>*this</tt>.<br>
1057 <b>Throws:</b> nothing.
1058
1059<hr>
1060<pre>
1061dynamic_bitset&amp; <a name=
1062"op-sr-assign">operator&gt;&gt;=</a>(size_type n)
1063</pre>
1064
1065<b>Effects:</b> Shifts the bits in this bitset to the right by
1066<tt>n</tt> bits. For each bit in the bitset, the bit at position
1067<tt>pos</tt> takes on the previous value of bit <tt>pos + n</tt>,
1068or zero if no such bit exists.<br>
1069 <b>Returns:</b> <tt>*this</tt>.<br>
1070 <b>Throws:</b> nothing.
1071
1072<hr>
1073<pre>
1074dynamic_bitset <a name=
1075"op-sl">operator&lt;&lt;</a>(size_type n) const
1076</pre>
1077
1078<b>Returns:</b> a copy of <tt>*this</tt> shifted to the left by
1079<tt>n</tt> bits. For each bit in the returned bitset, the bit at
1080position pos takes on the value of the bit at position <tt>pos -
1081n</tt> of this bitset, or zero if no such bit exists. Note that
1082the expression <tt>b &lt;&lt; n</tt> is equivalent to
1083constructing a temporary copy of <tt>b</tt> and then using
1084<tt>operator&lt;&lt;=</tt>.<br>
1085 <b>Throws:</b> An allocation error if memory is exhausted
1086(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1087
1088<hr>
1089<pre>
1090dynamic_bitset <a name=
1091"op-sr">operator&gt;&gt;</a>(size_type n) const
1092</pre>
1093
1094<b>Returns:</b> a copy of <tt>*this</tt> shifted to the right by
1095<tt>n</tt> bits. For each bit in the returned bitset, the bit at
1096position pos takes on the value of the bit at position <tt>pos +
1097n</tt> of this bitset, or zero if no such bit exists. Note that
1098the expression <tt>b &gt;&gt; n</tt> is equivalent to
1099constructing a temporary copy of <tt>b</tt> and then using
1100<tt>operator&gt;&gt;=</tt>.<br>
1101 <b>Throws:</b> An allocation error if memory is exhausted
1102(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1103
1104<hr>
1105<pre>
1106dynamic_bitset&amp; <a name="set1">set</a>()
1107</pre>
1108
1109<b>Effects:</b> Sets every bit in this bitset to 1.<br>
1110<b>Returns:</b> <tt>*this</tt><br>
1111<b>Throws:</b> nothing.
1112
1113<hr>
1114<pre>
1115dynamic_bitset&amp; <a name="flip1">flip</a>()
1116</pre>
1117
1118<b>Effects:</b> Flips the value of every bit in this bitset.<br>
1119<b>Returns:</b> <tt>*this</tt><br>
1120<b>Throws:</b> nothing.
1121
1122<hr>
1123<pre>
1124dynamic_bitset <a name="op-not">operator~</a>() const
1125</pre>
1126
1127<b>Returns:</b> a copy of <tt>*this</tt> with all of its bits
1128flipped.<br>
1129<b>Throws:</b> An allocation error if memory is exhausted
1130(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1131
1132<hr>
1133<pre>
1134dynamic_bitset&amp; <a name="reset1">reset</a>()
1135</pre>
1136
1137<b>Effects:</b> Clears every bit in this bitset.<br>
1138<b>Returns:</b> <tt>*this</tt><br>
1139<b>Throws:</b> nothing.
1140
1141<hr>
1142<pre>
1143dynamic_bitset&amp; <a name=
1144"set2">set</a>(size_type n, bool val = true)
1145</pre>
1146
1147<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1148 <b>Effects:</b> Sets bit <tt>n</tt> if <tt>val</tt> is
1149<tt>true</tt>, and clears bit <tt>n</tt> if <tt>val</tt> is
1150<tt>false</tt>. <br>
1151 <b>Returns:</b> <tt>*this</tt>
1152
1153<hr>
1154<pre>
1155dynamic_bitset&amp; <a name="reset2">reset</a>(size_type n)
1156</pre>
1157
1158<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1159<b>Effects:</b> Clears bit <tt>n</tt>.<br>
1160<b>Returns:</b> <tt>*this</tt>
1161
1162<hr>
1163<pre>
1164dynamic_bitset&amp; <a name="flip2">flip</a>(size_type n)
1165</pre>
1166
1167<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1168<b>Effects:</b> Flips bit <tt>n</tt>.<br>
1169<b>Returns:</b> <tt>*this</tt>
1170
1171<hr>
1172<pre>
1173size_type <a name="size">size</a>() const
1174</pre>
1175
1176<b>Returns:</b> the number of bits in this bitset.<br>
1177<b>Throws:</b> nothing.
1178
1179<hr>
1180<pre>
1181size_type <a name="num_blocks">num_blocks</a>() const
1182</pre>
1183
1184<b>Returns:</b> the number of blocks in this bitset.<br>
1185<b>Throws:</b> nothing.
1186
1187<hr>
1188<pre>
1189size_type <a name="max_size">max_size</a>() const;
1190</pre>
1191
1192<b>Returns:</b> the maximum size of a <tt>dynamic_bitset</tt>
1193object having the same type as <tt>*this</tt>. Note that if
1194any <tt>dynamic_bitset</tt> operation causes <tt>size()</tt> to
1195exceed <tt>max_size()</tt> then the <i>behavior is undefined</i>.
1196<br><br>[The semantics of this function could change slightly
1197when lib issue 197 will be closed - G.P.S.]<br>
1198
1199<hr>
1200<pre>
1201bool <a name="empty">empty</a>() const;
1202</pre>
1203
1204<b>Returns:</b> <tt>true</tt> if <tt>this->size() == 0</tt>, <tt>false</tt>
1205otherwise. <i>Note</i>: not to be confused with <tt>none()</tt>, that has
1206different semantics.
1207
1208<hr>
1209 <!--  ***************** To be removed - gps *************************
1210<pre>
1211void <a name="reserve">reserve</a>(size_type n);
1212</pre>
1213
1214<b>Precondition:</b> <tt>n &lt;= this-&gt;max_size()</tt>.<br>
1215<b>Effects:</b> informs the <tt>dynamic_bitset</tt> of a planned
1216change in size(), so that reallocations can be managed accordingly.
1217If before the call the dynamic_bitset's capacity is >= n then no
1218reallocation happens and capacity remains unchanged. Otherwise
1219storage is allocated and capacity becomes greater or equal to n.
1220In any case, size() does not change.<br>
1221<b>Throws:</b> An allocation error if <tt>n &gt; capacity()</tt>
1222and memory is exhausted (<tt>std::bad_alloc</tt> if <tt>
1223Allocator=std::allocator</tt>).
1224
1225<hr>
1226<pre>
1227size_type <a name="capacity">capacity()</a> const;
1228</pre>
1229
1230<b>Returns:</b> the total number of elements that <tt>*this</tt>
1231can hold without requiring reallocation.<br>
1232 *************************************************************** -->
1233
1234<hr>
1235<pre>
1236size_type <a name="count">count</a>() const
1237</pre>
1238
1239<b>Returns:</b> the number of bits in this bitset that are
1240set.<br>
1241<b>Throws:</b> nothing.
1242
1243<hr>
1244<pre>
1245bool <a name="any">any</a>() const
1246</pre>
1247
1248<b>Returns:</b> <tt>true</tt> if any bits in this bitset are set,
1249and otherwise returns <tt>false</tt>.<br>
1250<b>Throws:</b> nothing.
1251
1252<hr>
1253<pre>
1254bool <a name="none">none</a>() const
1255</pre>
1256
1257<b>Returns:</b> <tt>true</tt> if no bits are set, and otherwise
1258returns <tt>false</tt>.<br>
1259<b>Throws:</b> nothing.
1260
1261<hr>
1262<pre>
1263bool <a name="test">test</a>(size_type n) const
1264</pre>
1265
1266<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1267 <b>Returns:</b> <tt>true</tt> if bit <tt>n</tt> is set and
1268<tt>false</tt> is bit <tt>n</tt> is 0.
1269
1270<hr>
1271<pre>
1272reference <a name="bracket">operator[]</a>(size_type n)
1273</pre>
1274
1275<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1276 <b>Returns:</b> a <tt>reference</tt> to bit <tt>n</tt>. Note
1277that <tt>reference</tt> is a proxy class with an assignment
1278operator and a conversion to <tt>bool</tt>, which allows you to
1279use <tt>operator[]</tt> for assignment. That is, you can write
1280both <tt>x = b[n]</tt> and <tt>b[n] = x</tt>. However, in many
1281other respects the proxy is not the same as the true reference
1282type <tt>bool&amp;</tt>.
1283
1284<hr>
1285<pre>
1286bool <a name="const-bracket">operator[]</a>(size_type n) const
1287</pre>
1288
1289<b>Precondition:</b> <tt>n &lt; this-&gt;size()</tt>.<br>
1290<b>Returns:</b> The same as <tt>test(n)</tt>.
1291
1292<hr>
1293<pre>
1294unsigned long <a name="to_ulong">to_ulong</a>() const
1295</pre>
1296
1297<b>Returns:</b> The numeric value corresponding to the bits in <tt>*this</tt>.
1298<br>
1299<b>Throws:</b> <tt>std::overflow_error</tt> if that value is too large to
1300be represented in an <tt>unsigned long</tt>, i.e. if <tt>*this</tt> has
1301any non-zero bit at a position <tt>&gt;=
1302std::numeric_limits&lt;unsigned long&gt;::digits</tt>.
1303
1304<hr>
1305<pre>
1306bool <a name=
1307"is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const
1308</pre>
1309
1310<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br>
1311<b>Returns:</b> true if this bitset is a subset of bitset
1312<tt>a</tt>. That is, it returns true if, for every bit that is
1313set in this bitset, the corresponding bit in bitset <tt>a</tt> is
1314also set. Otherwise this function returns false.<br>
1315<b>Throws:</b> nothing.
1316
1317<hr>
1318<pre>
1319bool <a name=
1320"is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const
1321</pre>
1322
1323<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br>
1324<b>Returns:</b> true if this bitset is a proper subset of bitset
1325<tt>a</tt>. That is, it returns true if, for every bit that is
1326set in this bitset, the corresponding bit in bitset <tt>a</tt> is
1327also set and if <tt>this-&gt;count() &lt; a.count()</tt>.
1328Otherwise this function returns false.<br>
1329<b>Throws:</b> nothing.
1330
1331<hr>
1332<pre>
1333size_type <a name = "find_first">find_first</a>() const;
1334</pre>
1335
1336<b>Returns:</b> the lowest index <tt>i</tt> such as bit <tt>i</tt>
1337is set, or <tt>npos</tt> if <tt>*this</tt> has no on bits.
1338
1339<hr>
1340<pre>
1341size_type <a name="find_next">find_next</a>(size_type pos) const;
1342</pre>
1343
1344<b>Returns:</b> the lowest index <tt>i</tt> greater than
1345<tt>pos</tt> such as bit <tt>i</tt> is set, or <tt>npos</tt> if
1346no such index exists.
1347
1348<hr>
1349<pre>
1350bool <a name=
1351"op-equal">operator==</a>(const dynamic_bitset&amp; rhs) const
1352</pre>
1353
1354<b>Returns:</b> <tt>true</tt> if <tt>this-&gt;size() ==
1355rhs.size()</tt> and if for all <tt>i</tt> in the range
1356<tt>[0,rhs.size())</tt>, <tt>(*this)[i] == rhs[i]</tt>. Otherwise
1357returns <tt>false</tt>.<br>
1358 <b>Throws:</b> nothing.<br>
1359 (Required by <a href=
1360"http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
1361Comparable</a>.)
1362
1363<hr>
1364<pre>
1365bool <a name=
1366"op-not-equal">operator!=</a>(const dynamic_bitset&amp; rhs) const
1367</pre>
1368
1369<b>Returns:</b> <tt>!((*this) == rhs)</tt><br>
1370<b>Throws:</b> nothing.<br>
1371(Required by <a href=
1372"http://www.sgi.com/tech/stl/EqualityComparable.html">Equality
1373Comparable</a>.)
1374
1375<hr>
1376<pre>
1377bool <a name=
1378"op-less">operator&lt;</a>(const dynamic_bitset&amp; rhs) const
1379</pre>
1380
1381<b>Returns:</b> <tt>true</tt> if this bitset is lexicographically
1382less than <tt>rhs</tt>, and returns <tt>false</tt> otherwise.
1383(See the description of <a href=
1384"http://www.sgi.com/tech/stl/lexicographical_compare.html">lexicographical_compare</a>
1385for a definition of lexicographic ordering). <br>
1386<b>Throws:</b> nothing.<br>
1387(Required by <a href=
1388"http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
1389Comparable</a>.)
1390
1391<hr>
1392<pre>
1393bool <a name=
1394"op-greater">operator&gt;</a>(const dynamic_bitset&amp; rhs) const
1395</pre>
1396
1397<b>Returns:</b> <tt>!((*this) &lt; rhs || (*this) ==
1398rhs)</tt><br>
1399<b>Throws:</b> nothing.<br>
1400(Required by <a href=
1401"http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
1402Comparable</a>.)
1403
1404<hr>
1405<pre>
1406bool <a name=
1407"op-less-equal">operator&lt;=</a>(const dynamic_bitset&amp; rhs) const
1408</pre>
1409
1410<b>Returns:</b> <tt>(*this) &lt; rhs || (*this) == rhs</tt><br>
1411<b>Throws:</b> nothing.<br>
1412(Required by <a href=
1413"http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
1414Comparable</a>.)
1415
1416<hr>
1417<pre>
1418bool <a name=
1419"op-greater-equal">operator&gt;=</a>(const dynamic_bitset&amp; rhs) const
1420</pre>
1421
1422<b>Returns:</b> <tt>(*this) &gt; rhs || (*this) == rhs</tt><br>
1423<b>Throws:</b> nothing.<br>
1424(Required by <a href=
1425"http://www.sgi.com/tech/stl/LessThanComparable.html">Less Than
1426Comparable</a>.)
1427
1428<hr>
1429<h3><a name="non-member-functions">Non-Member Functions</a></h3>
1430
1431<hr>
1432<pre>
1433dynamic_bitset <a name=
1434"op-and">operator&amp;</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
1435</pre>
1436
1437<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
1438<b>Returns:</b> A new bitset that is the bitwise-AND of the
1439bitsets <tt>a</tt> and <tt>b</tt>. Note that the expression
1440<tt>b1 &amp; b2</tt> is equivalent to creating a temporary copy
1441of <tt>b1</tt>, using <tt>operator&amp;=</tt>, and returning the
1442temporary copy.<br>
1443<b>Throws:</b> An allocation error if memory is exhausted
1444(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1445
1446<hr>
1447<pre>
1448dynamic_bitset <a name=
1449"op-or">operator|</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
1450</pre>
1451
1452<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
1453<b>Returns:</b> A new bitset that is the bitwise-OR of the
1454bitsets <tt>a</tt> and <tt>b</tt>. Note that the expression
1455<tt>b1 &amp; b2</tt> is equivalent to creating a temporary copy
1456of <tt>b1</tt>, using <tt>operator&amp;=</tt>, and returning the
1457temporary copy.<br>
1458<b>Throws:</b> An allocation error if memory is exhausted
1459(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1460
1461<hr>
1462<pre>
1463dynamic_bitset <a name=
1464"op-xor">operator^</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
1465</pre>
1466
1467<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
1468<b>Returns:</b> A new bitset that is the bitwise-XOR of the
1469bitsets <tt>a</tt> and <tt>b</tt>. Note that the expression
1470<tt>b1 &amp; b2</tt> is equivalent to creating a temporary copy
1471of <tt>b1</tt>, using <tt>operator&amp;=</tt>, and returning the
1472temporary copy.<br>
1473<b>Throws:</b> An allocation error if memory is exhausted
1474(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1475
1476<hr>
1477<pre>
1478dynamic_bitset <a name=
1479"op-sub">operator-</a>(const dynamic_bitset&amp; a, const dynamic_bitset&amp; b)
1480</pre>
1481
1482<b>Requires:</b> <tt>a.size() == b.size()</tt><br>
1483<b>Returns:</b> A new bitset that is the set difference of the
1484bitsets <tt>a</tt> and <tt>b</tt>. Note that the expression
1485<tt>b1 - b2</tt> is equivalent to creating a temporary copy of
1486<tt>b1</tt>, using <tt>operator-=</tt>, and returning the
1487temporary copy.<br>
1488<b>Throws:</b> An allocation error if memory is exhausted
1489(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1490
1491<hr>
1492<pre>
1493template &lt;typename CharT, typename Alloc&gt;
1494void <a name=
1495"to_string">to_string</a>(const dynamic_bitset&lt;Block, Allocator&gt;&amp; b,
1496               <a href=
1497"http://www.sgi.com/tech/stl/basic_string.html">std::basic_string</a>&lt;Char,Traits,Alloc&gt;&amp; s)
1498</pre>
1499
1500<b>Effects:</b> Copies a representation of <tt>b</tt> into the
1501string <tt>s</tt>. A character in the string is <tt>'1'</tt> if
1502the corresponding bit is set, and <tt>'0'</tt> if it is not.
1503Character position <tt>i</tt> in the string corresponds to bit
1504position <tt>b.size() - 1 - i</tt>. <br>
1505 <b>Throws:</b> If memory is exhausted, the string will throw an
1506allocation error.<br>
1507 <b>Rationale:</b> This function is not a member function taking
1508zero arguments and returning a string for a couple reasons.
1509First, this version can be slighly more efficient because the
1510string is not copied (due to being passed by value). Second, as a
1511member function, to allow for flexibility with regards to the
1512template parameters of <tt>basic_string</tt>, the member function
1513would require explicit template parameters. Few C++ programmers
1514are familiar with explicit template parameters, and some C++
1515compilers do not handle them properly.
1516
1517<hr>
1518<pre>
1519template &lt;typename Block, typename Alloc, typename BlockOutputIterator&gt;
1520void <a name=
1521"to_block_range">to_block_range</a>(const dynamic_bitset&lt;Block, Alloc&gt;&amp; b, BlockOutputIterator result)
1522</pre>
1523
1524<b>Effects:</b> Writes the bits of the bitset into the iterator
1525<tt>result</tt> a block at a time. The first block written
1526represents the bits in the position range
1527<tt>[0,bits_per_block)</tt> in the bitset, the second block
1528written the bits in the range
1529<tt>[bits_pre_block,2*bits_per_block)</tt>, and so on. For each
1530block <tt>bval</tt> written, the bit <tt>(bval &gt;&gt; i) &amp;
15311</tt> corresponds to the bit at position <tt>(b * bits_per_block
1532+ i)</tt> in the bitset.<br>
1533 <b>Requires:</b> The type <tt>BlockOutputIterator</tt> must be a
1534model of <a href=
1535"http://www.sgi.com/tech/stl/OutputIterator.html">Output
1536Iterator</a> and its <tt>value_type</tt> must be the same type as
1537<tt>Block</tt>. Further, the size of the output range must be
1538greater or equal <tt>b.num_blocks()</tt>.
1539
1540<hr>
1541<pre>
1542template &lt;typename BlockIterator, typename Block, typename Alloc&gt;
1543void <a name=
1544"from_block_range">from_block_range</a>(BlockIterator first,
1545    BlockIterator last, const dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
1546</pre>
1547
1548<b>Effects:</b> Reads blocks from the iterator range into the
1549bitset. <br>
1550 <b>Requires:</b> The type <tt>BlockIterator</tt> must be a model
1551of <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input
1552Iterator</a> and its <tt>value_type</tt> must be the same type as
1553<tt>Block</tt>. The size of the iterator range must be less or
1554equal to <tt>b.num_blocks()</tt>.
1555
1556<hr>
1557<pre>
1558template &lt;typename Char, typename Traits, typename Block, typename Alloc&gt;
1559basic_ostream&lt;Char, Traits&gt;&amp;
1560<a name=
1561"op-out">operator&lt;&lt;</a>(basic_ostream&lt;Char, Traits&gt;&amp; os, const dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
1562</pre>
1563
1564<b>Effects:</b> Inserts a textual representation of b into the stream
1565<tt>os</tt> (highest bit first). Informally, the output is the same as doing
1566
1567<pre>
1568std::basic_string&lt;Char, Traits&gt; s;
1569boost::to_string(x, s):
1570os << s;
1571</pre>
1572
1573except that the stream inserter takes into accout the locale imbued into
1574<tt>os</tt>, which <tt>boost::to_string()</tt> can't do. Here is a more
1575precise specification, given in terms of "as if" rule: first, for each
1576valid position i into the bitset <tt>b</tt> let's put:
1577
1578 <tt>character_of(b[i)]) = b[i]? os.widen('1') : os.widen('0');</tt>
1579 
1580Let also <tt>s</tt> be a <tt>std::basic_string&lt;Char, Traits&gt;</tt>
1581object, having length <tt>b.size()</tt> and such as, for each <tt>i</tt>
1582in <tt>[0, b.size())</tt>,
1583
1584 <tt>s[i] is character_of(b[i])</tt> 
1585
1586Then, the output, the effects on <tt>os</tt> and the exception behavior
1587is the same as outputting the object <tt>s</tt> to <tt>os</tt> (same
1588width, same exception mask, same padding, same setstate() logic)
1589<br>
1590<b>Returns:</b> os <br>
1591<b>Throws:</b> <tt>std::ios_base::failure</tt> if there is a
1592problem writing to the stream.
1593
1594<hr>
1595<pre>
1596template &lt;typename Char, typename Traits, typename Block, typename Alloc&gt;
1597std::basic_istream&lt;Char,Traits&gt;&amp;
1598<a name=
1599"op-in">operator&gt;&gt;</a>(std::basic_istream&lt;Char,Traits&gt;&amp; is, dynamic_bitset&lt;Block, Alloc&gt;&amp; b)
1600</pre>
1601
1602<b>Effects:</b> Extracts a <tt>dynamic_bitset</tt> from an input stream.
1603<br><br>
1604 <i>Definitions:</i><br><br>
1605 Let <i>Tr</i> be the traits_type of <i>is</i>. Then:
1606 <ol>
1607 <li>
1608 A (non-eof) character <tt>c</tt> extracted from <tt>is</tt>
1609 is a <i>bitset digit</i> if and only if either Tr::eq(c, is.widen('0')) or
1610 Tr::eq(c, is.widen('1')) return true.
1611 </li>
1612 <li>If c is a bitset digit, it's <i>corresponding bit value</i> is 0 if
1613 Tr::eq(c, is.widen('0')) is true, 1 otherwise.
1614 </li>
1615 </ol>
1616
1617The function begins by constructing a <tt>sentry</tt> object <tt>k</tt> as if <tt>k</tt>
1618were constructed by
1619
1620 <tt>typename std::basic_istream&lt;Char, Traits&gt;::sentry k(is)</tt>.
1621
1622If <tt>bool(k)</tt> is true, it calls <tt>b.clear()</tt>
1623then attempts to extract characters from <tt>is</tt>. For each character c
1624that is a <i>bitset digit</i> the <i>corresponding bit value</i> is
1625appended to the less significant end of <tt>b</tt> (appending may throw - gps ).
1626If <tt>is.width()</tt> is greater than zero and smaller than <tt>b.max_size()</tt>
1627then the maximum number <tt>n</tt> of bits appended is <tt>is.width()</tt>;
1628otherwise <tt>n</tt> = <tt>b.max_size()</tt>.
1629
1630Unless the extractor is exited via an exception, characters are extracted (and
1631corresponding bits appended) until any of the following occurs:<br>
1632
1633<ul>
1634<li> <tt>n</tt> bits are stored into the bitset;</li>
1635<li> end-of-file, or an error, occurs on the input sequence;</li>
1636<li> the next available input character isn't a bitset digit</li>
1637</ul>
1638<br> If no exception caused the function to exit then <tt>is.width(0)</tt> is
1639     called, regardless of how many characters were actually extracted. The
1640     sentry object k is destroyed.
1641<br>
1642<br>If the function extracts no characters[???], it calls is.setstate(std::ios::failbit),
1643     which may throw <tt>std::ios_base::failure</tt>.
1644
1645
1646<br>------
1647
1648
1649<br>
1650<b>Throws:</b> An allocation error if memory is exhausted
1651(<tt>std::bad_alloc</tt> if <tt>Allocator=std::allocator</tt>).
1652A <tt>std::ios_base::failure</tt> if there is a problem reading
1653from the stream.
1654
1655<hr>
1656<h3><a name="exception-guarantees">Exception guarantees</a></h3>
1657
1658All of <tt>dynamic_bitset</tt> functions offer at least the basic
1659guarantee. In addition some functions offer the strong or the nothrow
1660guarantee as summarized in the table below (the destructor, as usual,
1661doesn't throw):
1662<table summary="" border>
1663<tr><td>-</td><td><i>strong</i></td><td><i>nothrow</i></td></tr>
1664<tr><td>f</td><td>         </td><td><b> x </b></td></tr>
1665</table>
1666
1667
1668
1669<hr>
1670<h3><a name="changes-from-previous-ver">Changes from previous version(s)</a></h3>
1671
1672<!-- Changes from Boost 1.31.0 -->
1673<h4><i>Changes from Boost 1.31.0</i></h4>
1674<ul>
1675<li>
1676The stream extractor has completely different semantics: as
1677natural for a dynamic structure, it now expands the bitset as needed
1678during extraction. The new behaviour mimics that of the basic_string
1679extractor but there are some differences the user should be aware
1680of; so, please, look at the <a href="#op-in">documentation</a>.
1681(One of the differences concerns the case where
1682  stream.width() > bitset.max_size() > 0;
1683in that circumstance the extractor of dynamic_bitset never attempts to
1684extract more than max_size() characters, whereas the extractor of
1685basic_string goes on and, on conforming implementations, eventually
1686throws a length_error. Note: That's what the standard mandates -see
1687especially library issue 83- but not all implementations conform)
1688<br><br>
1689The stream extractor is now also 'exception-aware' in the sense that
1690it works correctly when setting exception masks on the stream.<br><br>
1691</li>
1692<li>
1693Several member functions (<tt>empty()</tt>, <tt>find_first()</tt>
1694, <tt>find_next()</tt>, <tt>get_allocator()</tt>, <tt>intersects()</tt>
1695, <tt>max_size()</tt> <!--, <tt>reserve()</tt>, <tt>capacity()</tt> -->)
1696have been added.
1697</li>
1698<li>
1699The constructor from basic_string has a new parameter that was totally
1700forgotten before.
1701</li>
1702
1703</ul>
1704<i>Technicalities and minor changes</i>
1705<ul>
1706<li>
1707The class <tt>reference</tt> has been reimplemented so that
1708dynamic_bitset's references behave more like references to standard
1709container elements. In particular it is now guaranteed that they
1710cannot be invalidated from a standard library swap() function
1711applied to their corresponding <tt>dynamic_bitset</tt>s.
1712</li>
1713</ul>
1714<i>General improvements</i>
1715<br><br>
1716Several optimizations to member and non-member functions and to the
1717nested class <tt>reference</tt>.
1718
1719<hr>
1720<h3><a name="see-also">See also</a></h3>
1721
1722<tt><a href=
1723"http://www.sgi.com/tech/stl/bitset.html">std::bitset</a></tt>,
1724<tt><a href=
1725"http://www.sgi.com/tech/stl/Vector.html">std::vector</a></tt>,
1726
1727<h3><a name="acknowledgements">Acknowledgements</a></h3>
1728
1729<p>We would like to thank the Boost community for putting in the
1730time to review and accept this library. This library is much
1731better than it ever would have been due to all the suggestions
1732from Boost members. We especially thank Matt Marcus for taking on
1733the task of review manager. Also, a special thanks goes to
1734James Kanze for his invaluable help with the internationalization
1735issues.</p>
1736
1737<hr>
1738<table summary="">
1739<tr>
1740<td></td>
1741</tr>
1742
1743<tr valign="top">
1744<td nowrap>Copyright &copy; 2001</td>
1745<td><a href="../../people/jeremy_siek.htm">Jeremy Siek</a>,
1746Indiana University (<a href=
1747"mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</a>)<br>
1748<a href="http://freshsources.com">Chuck Allison</a>, Senior
1749Editor, C/C++ Users Journal (<a href=
1750"mailto:cda@freshsources.com">cda@freshsources.com</a>)<br>
1751</td>
1752</tr>
1753
1754<tr valign="top">
1755<td nowrap>Copyright &copy; 2003-2004</td>
1756<td>Gennaro Prota</td>
1757</tr>
1758</table>
1759
1760<!--  LocalWords:  dynamic bitset alt gif iostream hpp int bitsets const ul ulong
1761 -->
1762<!--  LocalWords:  STL LessThan alloc num typename BlockInputIterator html pos
1763 -->
1764<!--  LocalWords:  npos bool rhs OR's XOR's val CharT istream ostream os siek
1765 -->
1766<!--  LocalWords:  htm namespace enum sizeof BlockOutputIterator fwd ith jth
1767 -->
1768</body>
1769</html>
1770
Note: See TracBrowser for help on using the repository browser.