From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html (limited to 'libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html') diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html new file mode 100644 index 000000000..eba8cfb31 --- /dev/null +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch21s02.html @@ -0,0 +1,43 @@ + + +HP/SGI

+

A few extensions and nods to backwards-compatibility have been made with + containers. Those dealing with older SGI-style allocators are dealt with + elsewhere. The remaining ones all deal with bits: +

The old pre-standard bit_vector class is present for + backwards compatibility. It is simply a typedef for the + vector<bool> specialization. +

The bitset class has a number of extensions, described in the + rest of this item. First, we'll mention that this implementation of + bitset<N> is specialized for cases where N number of + bits will fit into a single word of storage. If your choice of N is + within that range (<=32 on i686-pc-linux-gnu, for example), then all + of the operations will be faster. +

There are + versions of single-bit test, set, reset, and flip member functions which + do no range-checking. If we call them member functions of an instantiation + of "bitset<N>," then their names and signatures are: +

+   bitset<N>&   _Unchecked_set   (size_t pos);
+   bitset<N>&   _Unchecked_set   (size_t pos, int val);
+   bitset<N>&   _Unchecked_reset (size_t pos);
+   bitset<N>&   _Unchecked_flip  (size_t pos);
+   bool         _Unchecked_test  (size_t pos);
+   

Note that these may in fact be removed in the future, although we have + no present plans to do so (and there doesn't seem to be any immediate + reason to). +

The semantics of member function operator[] are not specified + in the C++ standard. A long-standing defect report calls for sensible + obvious semantics, which are already implemented here: op[] + on a const bitset returns a bool, and for a non-const bitset returns a + reference (a nested type). However, this implementation does + no range-checking on the index argument, which is in keeping with other + containers' op[] requirements. The defect report's proposed + resolution calls for range-checking to be done. We'll just wait and see... +

Finally, two additional searching functions have been added. They return + the index of the first "on" bit, and the index of the first + "on" bit that is after prev, respectively: +

+   size_t _Find_first() const;
+   size_t _Find_next (size_t prev) const;

The same caveat given for the _Unchecked_* functions applies here also. +

-- cgit v1.2.3