From b7b97bb2dda71758852c3c011f8853e372baf523 Mon Sep 17 00:00:00 2001 From: pme Date: Sat, 15 Sep 2001 00:41:11 +0000 Subject: [PATCH] 2001-09-14 Phil Edwards * docs/html/17_intro/headers_cc.txt: "Sync"/copy real file over. * docs/html/17_intro/howto.html: Spacing and HTML markup fixes. * docs/html/18_support/howto.html: It won't compile; it's not code. * docs/html/19_diagnostics/howto.html: Point diagram seekers to doxygen'd pages. * docs/html/22_locale/howto.html: Comment for future work. * docs/html/23_containers/howto.html: More comments. * docs/html/25_algorithms/howto.html: It's a comment, not a blunt command to the reader. (English grammar.) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45620 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 12 ++++++ libstdc++-v3/docs/html/17_intro/headers_cc.txt | 2 +- libstdc++-v3/docs/html/17_intro/howto.html | 52 ++++++++++++------------ libstdc++-v3/docs/html/18_support/howto.html | 6 +-- libstdc++-v3/docs/html/19_diagnostics/howto.html | 15 +++++-- libstdc++-v3/docs/html/22_locale/howto.html | 10 +++-- libstdc++-v3/docs/html/23_containers/howto.html | 42 ++++++++++++++++--- libstdc++-v3/docs/html/25_algorithms/howto.html | 6 +-- 8 files changed, 99 insertions(+), 46 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index aaeda25..7686966 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2001-09-14 Phil Edwards + + * docs/html/17_intro/headers_cc.txt: "Sync"/copy real file over. + * docs/html/17_intro/howto.html: Spacing and HTML markup fixes. + * docs/html/18_support/howto.html: It won't compile; it's not code. + * docs/html/19_diagnostics/howto.html: Point diagram seekers to + doxygen'd pages. + * docs/html/22_locale/howto.html: Comment for future work. + * docs/html/23_containers/howto.html: More comments. + * docs/html/25_algorithms/howto.html: It's a comment, not a + blunt command to the reader. (English grammar.) + 2001-09-14 Benjamin Kosnik * config/locale/moneypunct_members_gnu.cc: Fix initialization of diff --git a/libstdc++-v3/docs/html/17_intro/headers_cc.txt b/libstdc++-v3/docs/html/17_intro/headers_cc.txt index d95f17a..eb930f1 100644 --- a/libstdc++-v3/docs/html/17_intro/headers_cc.txt +++ b/libstdc++-v3/docs/html/17_intro/headers_cc.txt @@ -80,4 +80,4 @@ #include #endif -int main() { } +int main() { return 0; } diff --git a/libstdc++-v3/docs/html/17_intro/howto.html b/libstdc++-v3/docs/html/17_intro/howto.html index 34779e4..c55f1fba 100644 --- a/libstdc++-v3/docs/html/17_intro/howto.html +++ b/libstdc++-v3/docs/html/17_intro/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 17 - + @@ -70,8 +70,7 @@ definition that SGI uses for their STL subset. Please see the many cautions given in HOWTOs on containers.

-

- Here is another attempt at explaining the dangers of using the +

Here is another attempt at explaining the dangers of using the STL with threading support without understanding some important details. The STL implementation is currently configured to use the high-speed caching memory allocator. If you absolutely @@ -82,22 +81,21 @@ libstdc++-v3 when you provide -D__USE_MALLOC on the command line or make a change to that configuration file.

-

- If you don't like caches of objects being retained inside the - STL, then you might be tempted to define __USE_MALLOC either on - the command line or by rebuilding c++config.h. Please note, - once you define __USE_MALLOC, only the malloc allocator is - visible to application code (i.e. the typically higher-speed - allocator is not even available in this configuration). There - is a better way: It is possible to force the malloc-based - allocator on a per-case-basis for some application code even - when the above macro symbol is not defined. The author of this - comment believes that is a better way to tune an application for - high-speed using this implementation of the STL. Here is one - possible example displaying the forcing of the malloc-based +

If you don't like caches of objects being retained inside the STL, then + you might be tempted to define __USE_MALLOC either on the command + line or by rebuilding c++config.h. Please note, once you define + __USE_MALLOC, only the malloc allocator is visible to application code + (i.e. the typically higher-speed allocator is not even available + in this configuration). There is a better way: It is possible + to force the malloc-based allocator on a per-case-basis for some + application code even when the above macro symbol is not defined. + The library team generally believes that this is a better way to tune + an application for high-speed using this implementation of the STL. + Here is one possible example displaying the forcing of the malloc-based allocator over the typically higher-speed default allocator: - - std::list my_malloc_based_list; +

+      std::list <void*, std::malloc_alloc>  my_malloc_based_list;
+      

A recent journal article has described "atomic integer operations," which would allow us to, well, perform updates @@ -114,16 +112,18 @@ latest-to-oldest order.


Here are discussions that took place before the current snapshot; - they are still relevant and instructive. + they are still relevant and instructive. (Some of them may not work; + as the drive containing some of the 1999 archives crashed, and nobody + has had time to recover the backups.)
  • One way of preventing memory leaks by the old default memory @@ -181,7 +181,7 @@

    Comments and suggestions are welcome, and may be sent to the mailing list. -
    $Id: howto.html,v 1.5 2001/05/31 02:45:03 ljrittle Exp $ +
    $Id: howto.html,v 1.6 2001/06/08 03:53:35 ljrittle Exp $

    diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html index 154177b..04f61ae 100644 --- a/libstdc++-v3/docs/html/18_support/howto.html +++ b/libstdc++-v3/docs/html/18_support/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 18 - + @@ -171,7 +171,7 @@ reverse order of registration, once per registration call. (This isn't actually new.)
  • The previous two actions are "interleaved," that is, - given this code: + given this pseudocode:
                   extern "C or C++" void  f1 (void);
                   extern "C or C++" void  f2 (void);
    @@ -265,7 +265,7 @@
     

    Comments and suggestions are welcome, and may be sent to the mailing list. -
    $Id: howto.html,v 1.2 2001/04/03 00:26:55 pme Exp $ +
    $Id: howto.html,v 1.3 2001/05/30 21:54:58 pme Exp $

    diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html index 27e6361..f757606 100644 --- a/libstdc++-v3/docs/html/19_diagnostics/howto.html +++ b/libstdc++-v3/docs/html/19_diagnostics/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 19 - + @@ -59,8 +59,15 @@

    Exception class hierarchy diagram

    -

    The diagram is in PDF, or - at least it will be once it gets finished. +

    At one point we were going to make up a PDF of the exceptions + hierarchy, akin to the one done for the I/O class hierarchy. + Time was our enemy. Since then we've moved to Doxygen, which has + the useful property of not sucking. Specifically, when the source + code is changed, the diagrams are automatically brought up to date. + For the old way, we had to update the diagrams separately. +

    +

    There are several links to the Doxygen-generated pages from + here.

    Return to top of page or to the FAQ. @@ -108,7 +115,7 @@

    Comments and suggestions are welcome, and may be sent to the mailing list. -
    $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ +
    $Id: howto.html,v 1.4 2001/05/30 21:54:59 pme Exp $

    diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html index 55d2842..2edcad9 100644 --- a/libstdc++-v3/docs/html/22_locale/howto.html +++ b/libstdc++-v3/docs/html/22_locale/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 22 - + @@ -16,6 +16,10 @@

    Chapter 22 deals with the C++ localization facilities.

    + @@ -176,7 +180,7 @@ int main () { std::string s ("Some Kind Of Initial Input Goes Here"); - Toupper up ( std::locale("C") ); + Toupper up ( std::locale("C") ); Tolower down ( std::locale("C") ); // Change everything into upper case @@ -210,7 +214,7 @@

    Comments and suggestions are welcome, and may be sent to the mailing list. -
    $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ +
    $Id: howto.html,v 1.4 2001/08/08 02:48:58 bkoz Exp $

    diff --git a/libstdc++-v3/docs/html/23_containers/howto.html b/libstdc++-v3/docs/html/23_containers/howto.html index 03ba35d..7ae920b 100644 --- a/libstdc++-v3/docs/html/23_containers/howto.html +++ b/libstdc++-v3/docs/html/23_containers/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 23 - + @@ -26,6 +26,7 @@
  • Variable-sized bitmasks
  • Containers and multithreading
  • "Hinting" during insertion +
  • Bitmasks and string arguments

@@ -298,13 +299,19 @@ between h and h's predecessor.

+

For multimap and multiset, the restrictions are + slightly looser: "greater than" should be replaced by + "not less than" and "less than" should be replaced + by "not greater than." (Why not replace greater with + greater-than-or-equal-to? You probably could in your head, but the + mathematicians will tell you that it isn't the same thing.) +

If the conditions are not met, then the hint is not used, and the insertion proceeds as if you had called a.insert(t) instead. (Note that GCC releases prior to 3.0.2 - had a bug in the case with hint == begin(). You should not - use a hint argument in those releases.) -(Was it just with map or with all the rbtree-using containers? Still need -to check that.) + had a bug in the case with hint == begin() for the + map and set classes. You should not use a hint + argument in those releases.)

This behavior goes well with other container's insert() functions which take an iterator: if used, the new item will be @@ -326,6 +333,29 @@ to check that.) to the FAQ.

+
+

Bitmasks and string arguments

+

Bitmasks do not take char* nor const char* arguments in their + constructors. This is something of an accident, but you can read + about the problem: follow the library's "Links" from the + homepage, and from the C++ information "defect reflector" + link, select the library issues list. Issue number 116 describes the + problem. +

+

For now you can simply make a temporary string object using the + constructor expression: +

+      std::bitset<5> b ( std::string("10110") );
+      
+ instead of +
+      std::bitset<5> b ( "10110" );    // invalid
+      
+

+

Return to top of page or + to the FAQ. +

+ @@ -333,7 +363,7 @@ to check that.)

Comments and suggestions are welcome, and may be sent to the mailing list. -
$Id: howto.html,v 1.6 2001/06/08 03:53:35 ljrittle Exp $ +
$Id: howto.html,v 1.7 2001/08/24 20:34:34 pme Exp $

diff --git a/libstdc++-v3/docs/html/25_algorithms/howto.html b/libstdc++-v3/docs/html/25_algorithms/howto.html index 5444405..1e1ea29 100644 --- a/libstdc++-v3/docs/html/25_algorithms/howto.html +++ b/libstdc++-v3/docs/html/25_algorithms/howto.html @@ -8,7 +8,7 @@ libstdc++-v3 HOWTO: Chapter 25 - + @@ -38,7 +38,7 @@
  1. Anything that behaves like an iterator can be used in one of these algorithms. Raw pointers make great candidates, thus - built-in arrays are fine containers. So do your own iterators. + built-in arrays are fine containers, as well as your own iterators.
  2. The algorithms do not (and cannot) affect the container as a whole; only the things between the two iterator endpoints. If you pass a range of iterators only enclosing the middle third of @@ -87,7 +87,7 @@

    Comments and suggestions are welcome, and may be sent to the mailing list. -
    $Id: howto.html,v 1.2 2001/04/03 00:26:56 pme Exp $ +
    $Id: howto.html,v 1.3 2001/05/30 21:55:02 pme Exp $

    -- 2.7.4