diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 09615cb38c4..2626e73fddf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2011-12-30 Jonathan Wakely + + * doc/xml/manual/extensions.xml: Improve markup and note that some + extensions are included in C++11. + * doc/xml/manual/concurrency_extensions.xml: Likewise. + 2011-12-30 Paolo Carlini PR libstdc++/51711 diff --git a/libstdc++-v3/doc/xml/manual/concurrency_extensions.xml b/libstdc++-v3/doc/xml/manual/concurrency_extensions.xml index c87f41ba1c1..e36d3aa9947 100644 --- a/libstdc++-v3/doc/xml/manual/concurrency_extensions.xml +++ b/libstdc++-v3/doc/xml/manual/concurrency_extensions.xml @@ -21,7 +21,8 @@
Interface to Locks and Mutexes -The file <ext/concurrence.h> contains all the higher-level +The file <ext/concurrence.h> +contains all the higher-level constructs for playing with threads. In contrast to the atomics layer, the concurrence layer consists largely of types. All types are defined within namespace __gnu_cxx. @@ -65,14 +66,14 @@ host environment and the current compilation flags. interface: __mutex, and __scoped_lock. - - - The scoped lock idiom is well-discussed within the C++ community. This version takes a __mutex reference, and -locks it during construction of __scoped_locke and +locks it during construction of __scoped_lock and unlocks it during destruction. This is an efficient way of locking critical sections, while retaining exception-safety. +These types have been superseded in the ISO C++ 2011 standard by the +mutex and lock types defined in the header +<mutex>.
diff --git a/libstdc++-v3/doc/xml/manual/extensions.xml b/libstdc++-v3/doc/xml/manual/extensions.xml index 65082934396..804cc7f0bf7 100644 --- a/libstdc++-v3/doc/xml/manual/extensions.xml +++ b/libstdc++-v3/doc/xml/manual/extensions.xml @@ -160,7 +160,7 @@ extensions, be aware of two things: 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: + of bitset<N>, then their names and signatures are: bitset<N>& _Unchecked_set (size_t pos); @@ -173,14 +173,10 @@ extensions, be aware of two things: 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... +The member function operator[] on a const bitset returns + a bool, and for a non-const bitset returns a reference (a + nested type). No range-checking is done on the index argument, in keeping + with other containers' operator[] requirements. Finally, two additional searching functions have been added. They return the index of the first "on" bit, and the index of the first @@ -214,16 +210,20 @@ extensions, be aware of two things: <rb_tree> are all here; - <hash_map> and <hash_set> + <backwards/hash_map> and + <backwards/hash_set> are deprecated but available as backwards-compatible extensions, - as discussed further below. <rope> is the - SGI specialization for large strings ("rope," - "large strings," get it? Love that geeky humor.) - <slist> is a singly-linked list, for when the - doubly-linked list<> is too much space - overhead, and <rb_tree> exposes the red-black - tree classes used in the implementation of the standard maps and - sets. + as discussed further below. + <ext/rope> is the SGI + specialization for large strings ("rope," "large strings," get it? Love + that geeky humor.) + <ext/slist> (superseded in + C++11 by <forward_list>) + is a singly-linked list, for when the doubly-linked list<> + is too much space overhead, and + <ext/rb_tree> exposes the + red-black tree classes used in the implementation of the standard maps + and sets. Each of the associative containers map, multimap, set, and multiset have a counterpart which uses a @@ -256,6 +256,13 @@ extensions, be aware of two things: + + The deprecated hash tables are superseded by the standard unordered + associative containers defined in the ISO C++ 2011 standard in the + headers <unordered_map> + and <unordered_set>. + + @@ -264,36 +271,37 @@ extensions, be aware of two things: - The <functional> header contains many additional functors + The <functional> header + contains many additional functors and helper functions, extending section 20.3. They are implemented in the file stl_function.h: - identity_element for addition and multiplication. * + identity_element for addition and multiplication. The functor identity, whose operator() - returns the argument unchanged. * + returns the argument unchanged. Composition functors unary_function and binary_function, and their helpers compose1 - and compose2. * + and compose2. - select1st and select2nd, to strip pairs. * + select1st and select2nd, to strip pairs. - project1st and project2nd. * + project1st and project2nd. A set of functors/functions which always return the same result. They are constant_void_fun, constant_binary_fun, constant_unary_fun, constant0, - constant1, and constant2. * - The class subtractive_rng. * + constant1, and constant2. + The class subtractive_rng. mem_fun adaptor helpers mem_fun1 and mem_fun1_ref are provided for backwards compatibility. @@ -320,11 +328,11 @@ you can also use get_temporary_buffer(5, (int*)0); - A class temporary_buffer is given in stl_tempbuf.h. * + A class temporary_buffer is given in stl_tempbuf.h. The specialized algorithms of section 20.4.4 are extended with - uninitialized_copy_n. * + uninitialized_copy_n. @@ -371,25 +379,30 @@ get_temporary_buffer(5, (int*)0); Numerics -26.4, the generalized numeric operations such as accumulate, are extended - with the following functions: +26.4, the generalized numeric operations such as accumulate, + are extended with the following functions: power (x, n); - power (x, n, moniod_operation); -Returns, in FORTRAN syntax, "x ** n" where n>=0. In the - case of n == 0, returns the identity element for the + power (x, n, monoid_operation); +Returns, in FORTRAN syntax, "x ** n" where + n >= 0. In the + case of n == 0, returns the identity element for the monoid operation. The two-argument signature uses multiplication (for a true "power" implementation), but addition is supported as well. The operation functor must be associative. The iota function wins the award for Extension With the - Coolest Name. It "assigns sequentially increasing values to a range. - That is, it assigns value to *first, value + 1 to *(first + 1) and so - on." Quoted from SGI documentation. + Coolest Name (the name comes from Ken Iverson's APL language.) As + described in the SGI + documentation, it "assigns sequentially increasing values to a range. + That is, it assigns value to *first, + value + 1 to *(first + 1) and so on." void iota(_ForwardIter first, _ForwardIter last, _Tp value); +The iota function is included in the ISO C++ 2011 standard. +