This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libstdc++] maintainers' docs, allocator cleanup


One of the tension points regarding code documentation is whether docs
of internal "stuff" should be exposed to the user.  V3 is somewhat setup
to handle this by splitting the Doxygen confs into "user" and "maintainer"
docs; the former is a subset of the latter.  Up until now we never had enough
code documented to make it worth the difference.  Thus, the maint.cfg.in
file was ignored.  This brings it up to date by copying the user.cfg.in
on top of it and then making the appropriate slight changes.

"make doxygen-maint" actually does something now.  The difference is not
great, but the internal _Construct and _Destroy functions, for example,
only show up in the maintainers' docs.

libstdc++-v3 has man pages now!  Sort of.

The TODO file had some things that have been accomplished or are no longer
applicable.  I'm adding a TODO file for the doxygen work, too.

The FAQ now has some more points about the old -v2 code.

And the allocators... lots of indenting and linewrapping changes, the
comments have been doxygenated, some of the old SGI-isms have been removed,
and a couple of the internal classes have their names properly uglified.
There will be more work to come on the last two fronts.  (This was briefly
discussed on the mailing list.)

Bootstrapped on i686/linux repeatedly over the last several days with
no regressions.  Applied to trunk.


2001-11-23  Phil Edwards  <pme@gcc.gnu.org>

	* Makefile.am (doxygen-maint):  The script isn't executable in CVS.
	* Makefile.in:  Regenerated.
	* docs/doxygen/TODO:  New file listing doxygen work to be done.
	* docs/doxygen/run_doxygen:  Fix up man pages.
	* docs/doxygen/user.cfg.in:  Insert maint-only toggles.
	* docs/doxygen/maint.cfg.in:  Copy from user.cfg and turn toggles on.
	* include/bits/stl_construct.h:  Use new hooks for internal functions.

	* docs/html/17_intro/TODO:  Small updates.
	* docs/html/faq/index.html:  Likewise.
	* docs/html/faq/index.txt:  Regenerated.

	* include/bits/stl_alloc.h:  Doxygenate, reindent comments, remove
	SGI-isms and wrappers.
	(simple_alloc, debug_alloc):  Uglify class names.
	(__default_alloc_template):  Uglify "threads" template parameter and
	update corresponding macros.
	* include/backward/alloc.h:  Bring up to date.


Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/Makefile.am,v
retrieving revision 1.27
diff -u -3 -p -r1.27 Makefile.am
--- Makefile.am	2001/09/05 22:38:05	1.27
+++ Makefile.am	2001/11/24 03:21:46
@@ -53,7 +53,8 @@ doxygen:
 doxygen-maint:
 	-(srcdir=`cd ${top_srcdir}; pwd`; \
 	  outdir=`pwd`; \
-	  ${srcdir}/docs/doxygen/run_doxygen --mode=maint $${srcdir} $${outdir})
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=maint $${srcdir} $${outdir})
 
 .PHONY: doxygen doxygen-maint
 
Index: docs/doxygen/TODO
===================================================================
RCS file: TODO
diff -N TODO
--- /dev/null	Tue May  5 13:32:27 1998
+++ TODO	Fri Nov 23 19:21:46 2001
@@ -0,0 +1,52 @@
+
+The approach I've been using for a given header is to recursively do each
+of the "bits" headers which make up the standard header.  So, e.g., while
+there are five headers making up <algorithm>, three of them were already
+documented in the course of doing other headers.
+
+"Untouched" means I've deliberately skipped it for various reasons, or
+haven't gotten to it yet.  It /will/ be done (by somebody, eventually.)
+
+
+ Area           Still needs to be doxygen-documented
+-----------------------------------------------------------
+
+c17             FINISHED (Nothing in Clause 17 "exists" in terms of code.)
+c18             <limits>, Note A
+c19             Note A
+c20             std_memory.h[20.4], rel_ops (should they be doc'd?), Note A
+c21             Untouched, Note B
+c22             Untouched
+c23             See doxygroups.cc and Note B.
+                stl_alloc.h, stl_uninitialized.h remain from the common files.
+c24             Untouched
+c25             stl_tempbuf.h (small), stl_algo.h (big)
+c26             <complex>, <valarray>, stl_numeric.h[26.4], Note A
+c27             Untouched
+
+backward/       Not scanned by doxygen.  Should it be?
+
+ext/            Untouched
+
+__gnu_cxx       Extensions such as verbose_terminate_handler are documented
+                but do not appear in output, since the __gnu_cxx namespace is
+                itself undocumented.  Should it be?  Eeeeeeehhh...
+
+[1.3.5]         "implementation-defined behavior:  behavior ... that depends
+                on the implementation *and that each implementation shall
+                document*."  [my emphasis]  Not all implementation choices
+                have been thus described; doxygen is not necessarily the
+                appropriate place for such descriptions, either.
+
+-----------------------------------------------------------
+
+NOTES:
+
+A)  So far I have not tried to document any of the <c*> headers.  So entities
+such as atexit() are undocumented throughout the library.
+
+B)  Huge chunks of containers and strings are described in common "Tables"
+in the standard.  How to reproduce this information?
+
+
+vim:ts=4:et:
Index: docs/doxygen/maint.cfg.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/doxygen/maint.cfg.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 maint.cfg.in
--- maint.cfg.in	2001/11/23 16:29:00	1.2
+++ maint.cfg.in	2001/11/24 03:21:46
@@ -1,4 +1,4 @@
-# Doxyfile 1.2.4
+# Doxyfile 1.2.6
 
 # This file describes the settings to be used by doxygen for a project
 #
@@ -9,6 +9,10 @@
 #       TAG += value [value, ...]
 # Values that contain spaces should be placed between quotes (" ")
 
+### When doxygen is run, the current directory is the top of
+### the libstdc++-v3 source directory.  Keep this in mind while
+### writing relative-path directories.
+
 #---------------------------------------------------------------------------
 # General configuration options
 #---------------------------------------------------------------------------
@@ -16,13 +20,13 @@
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
 # by quotes) that should identify the project. 
 
-PROJECT_NAME           = "libstdc++"
+PROJECT_NAME           = "libstdc++-v3 Source"
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number. 
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 3
+PROJECT_NUMBER         = 
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
@@ -46,8 +50,8 @@ OUTPUT_LANGUAGE        = English
 # Private class members and static file members will be hidden unless 
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 
 
-#EXTRACT_ALL            = NO
-EXTRACT_ALL            = YES
+EXTRACT_ALL            = NO
+#EXTRACT_ALL            = YES
 
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
 # will be included in the documentation. 
@@ -65,21 +69,21 @@ EXTRACT_STATIC         = YES
 # various overviews, but no documentation section is generated. 
 # This option has no effect if EXTRACT_ALL is enabled. 
 
-HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_MEMBERS     = YES
 
 # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
 # undocumented classes that are normally visible in the class hierarchy. 
 # If set to NO (the default) these class will be included in the various 
 # overviews. This option has no effect if EXTRACT_ALL is enabled. 
 
-HIDE_UNDOC_CLASSES     = NO
+HIDE_UNDOC_CLASSES     = YES
 
 # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
 # include brief member descriptions after the members that are listed in 
 # the file and class documentation (similar to JavaDoc). 
 # Set to NO to disable this. 
 
-BRIEF_MEMBER_DESC      = NO
+BRIEF_MEMBER_DESC      = YES
 
 # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
 # the brief description of a member or function before the detailed description. 
@@ -118,12 +122,12 @@ INTERNAL_DOCS          = NO
 # generate a class diagram (in Html and LaTeX) for classes with base or 
 # super classes. Setting the tag to NO turns the diagrams off. 
 
-CLASS_DIAGRAMS         = NO
+CLASS_DIAGRAMS         = YES
 
 # If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
+# be generated. Documented entities will be cross-referenced with these sources.
 
-SOURCE_BROWSER         = NO
+SOURCE_BROWSER         = YES
 
 # Setting the INLINE_SOURCES tag to YES will include the body 
 # of functions and classes directly in the documentation. 
@@ -142,7 +146,7 @@ STRIP_CODE_COMMENTS    = YES
 # in case and if your file system supports case sensitive file names. Windows 
 # users are advised to set this option to NO.
 
-CASE_SENSE_NAMES       = YES
+CASE_SENSE_NAMES       = NO
 
 # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
 # will show members with their full class and namespace scopes in the 
@@ -186,14 +190,14 @@ INLINE_INFO            = YES
 # alphabetically by member name. If set to NO the members will appear in 
 # declaration order. 
 
-SORT_MEMBER_DOCS       = NO
+SORT_MEMBER_DOCS       = YES
 
 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
 # tag is set to YES, then doxygen will reuse the documentation of the first 
 # member in the group (if any) for the other members of the group. By default 
 # all members of a group must be documented explicitly.
 
-#DISTRIBUTE_GROUP_DOC   = NO
+DISTRIBUTE_GROUP_DOC   = YES
 
 # The TAB_SIZE tag can be used to set the number of spaces in a tab. 
 # Doxygen uses this value to replace tabs by spaces in code fragments. 
@@ -203,29 +207,59 @@ TAB_SIZE               = 4
 # The ENABLE_SECTIONS tag can be used to enable conditional 
 # documentation sections, marked by \if sectionname ... \endif. 
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       = maint
 
 # The GENERATE_TODOLIST tag can be used to enable (YES) or 
 # disable (NO) the todo list. This list is created by putting \todo 
 # commands in the documentation.
 
-GENERATE_TODOLIST      = YES
+GENERATE_TODOLIST      = NO
 
 # The GENERATE_TESTLIST tag can be used to enable (YES) or 
 # disable (NO) the test list. This list is created by putting \test 
 # commands in the documentation.
+
+GENERATE_TESTLIST      = NO
 
-GENERATE_TESTLIST      = YES
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
 
+GENERATE_BUGLIST       = YES
+
 # This tag can be used to specify a number of aliases that acts 
 # as commands in the documentation. An alias has the form "name=value". 
 # For example adding "sideeffect=\par Side Effects:\n" will allow you to 
 # put the command \sideeffect (or @sideeffect) in the documentation, which 
 # will result in a user defined paragraph with heading "Side Effects:". 
 # You can put \n's in the value part of an alias to insert newlines. 
+
+ALIASES                = "maint=\if maint" \
+                         "endmaint=\endif"
 
-#ALIASES                = 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting. 
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc. 
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation. 
 
+SHOW_USED_FILES        = YES
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
@@ -239,7 +273,6 @@ QUIET                  = YES
 # generated by doxygen. Possible values are YES and NO. If left blank 
 # NO is used. 
 
-### pme  Turned off; apparently doxygen can't grok templates
 WARNINGS               = NO
 
 # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
@@ -259,25 +292,47 @@ WARN_FORMAT            = "$file:$line: $
 # and error messages should be written. If left blank the output is written 
 # to stderr. 
 
-#WARN_LOGFILE           = 
+WARN_LOGFILE           = 
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
+# The INPUT tag can be used to specify the files and/or directories that contain
 # documented source files. You may enter file names like "myfile.cpp" or 
 # directories like "/usr/src/myproject". Separate the files or directories 
 # with spaces. 
 
-INPUT                  = include src libmath libsupc++ libio config
+INPUT                  = docs/doxygen \
+                         libsupc++ \
+                         include \
+                         src \
+libsupc++/exception libsupc++/new libsupc++/typeinfo include/ext/hash_map \
+include/ext/hash_set include/ext/rope include/ext/slist include/std/algorithm \
+include/std/bitset include/std/cassert include/std/cctype \
+include/std/cerrno include/std/cfloat include/std/ciso646 include/std/climits \
+include/std/clocale include/std/cmath include/std/complex include/std/csetjmp \
+include/std/csignal include/std/cstdarg include/std/cstddef \
+include/std/cstdio include/std/cstdlib include/std/cstring \
+include/std/ctime include/std/cwchar include/std/cwctype include/std/deque \
+include/std/fstream include/std/functional include/std/iomanip \
+include/std/ios include/std/iosfwd include/std/iostream include/std/istream \
+include/std/iterator include/std/limits include/std/list include/std/locale \
+include/std/map include/std/memory include/std/numeric include/std/ostream \
+include/std/queue include/std/set include/std/sstream include/std/stack \
+include/std/stdexcept include/std/streambuf include/std/string \
+include/std/utility include/std/valarray include/std/vector
 
 # If the value of the INPUT tag contains directories, you can use the 
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
 # and *.h) to filter out the source-files in the directories. If left 
 # blank all files are included. 
 
-FILE_PATTERNS          = *.cc *.h c++config
+FILE_PATTERNS          = *.doxy \
+                         *.cc \
+                         *.tcc \
+                         *.h \
+                         c++config
 
 # The RECURSIVE tag can be used to turn specify whether or not subdirectories 
 # should be searched for input files as well. Possible values are YES and NO. 
@@ -288,13 +343,16 @@ RECURSIVE              = YES
 # The EXCLUDE tag can be used to specify files and/or directories that should 
 # excluded from the INPUT source files. This way you can easily exclude a 
 # subdirectory from a directory tree whose root is specified with the INPUT tag. 
-EXCLUDE                = 
+
+EXCLUDE                = include/c \
+                         include/c_shadow \
+                         docs/doxygen/stdheader.cc
 
 # If the value of the INPUT tag contains directories, you can use the 
 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
 # certain files from those directories. 
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       = CVS
 
 # The EXAMPLE_PATH tag can be used to specify one or more files or 
 # directories that contain example code fragments that are included (see 
@@ -328,7 +386,7 @@ INPUT_FILTER           = 
 # INPUT_FILTER) will be used to filter the input files when producing source 
 # files to browse. 
 
-#FILTER_SOURCE_FILES    = NO
+FILTER_SOURCE_FILES    = NO
 
 #---------------------------------------------------------------------------
 # configuration options related to the alphabetical class index
@@ -385,7 +443,7 @@ HTML_FOOTER            = 
 # fine-tune the look of the HTML output. If the tag is left blank doxygen 
 # will generate a default style sheet 
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        = docs/doxygen/style.css
 
 # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
 # files or namespaces will be aligned in HTML using tables. If set to 
@@ -400,30 +458,47 @@ HTML_ALIGN_MEMBERS     = YES
 
 GENERATE_HTMLHELP      = NO
 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view. 
+
+TOC_EXPAND             = NO
+
 # The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
 # top of each HTML page. The value NO (the default) enables the index and 
 # the value YES disables it. 
 
-DISABLE_INDEX          = NO
+DISABLE_INDEX          = YES
 
 # This tag can be used to set the number of enum values (range [1..20]) 
 # that doxygen will group on one line in the generated HTML documentation. 
 
-#ENUM_VALUES_PER_LINE   = 4
+ENUM_VALUES_PER_LINE   = 4
 
-# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
 # generated containing a tree-like index structure (just like the one that 
 # is generated for HTML Help). For this to work a browser that supports 
 # JavaScript and frames is required (for instance Netscape 4.0+ 
 # or Internet explorer 4.0+). 
 
-GENERATE_TREEVIEW      = YES
+GENERATE_TREEVIEW      = NO
 
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
 # used to set the initial width (in pixels) of the frame in which the tree 
 # is shown. 
 
-#TREEVIEW_WIDTH         = 250
+TREEVIEW_WIDTH         = 250
 
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
@@ -528,7 +603,7 @@ RTF_STYLESHEET_FILE    = 
 # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
 # generate man pages 
 
-GENERATE_MAN           = NO
+GENERATE_MAN           = YES
 
 # The MAN_OUTPUT tag is used to specify where the man pages will be put. 
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
@@ -603,7 +678,7 @@ EXPAND_AS_DEFINED      = 
 
 # The TAGFILES tag can be used to specify one or more tagfiles. 
 
-TAGFILES               =
+TAGFILES               = 
 
 # When a file name is specified after GENERATE_TAGFILE, doxygen will create 
 # a tag file that is based on the input files it reads. 
@@ -630,7 +705,7 @@ PERL_PATH              = /usr/bin/perl
 # toolkit from AT&T and Lucent Bell Labs. The other options in this section 
 # have no effect if this option is set to NO (the default) 
 
-HAVE_DOT               = NO
+HAVE_DOT               = YES
 
 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
 # will generate a graph for each documented class showing the direct and 
@@ -689,8 +764,14 @@ MAX_DOT_GRAPH_HEIGHT   = 1024
 # generate a legend page explaining the meaning of the various boxes and 
 # arrows in the dot generated graphs. 
 
-#GENERATE_LEGEND        = YES
+GENERATE_LEGEND        = YES
 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs. 
+
+DOT_CLEANUP            = YES
+
 #---------------------------------------------------------------------------
 # Configuration::addtions related to the search engine   
 #---------------------------------------------------------------------------
@@ -737,4 +818,6 @@ EXT_DOC_PATHS          = 
 
 
 # End of file
+
+
 
Index: docs/doxygen/run_doxygen
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/doxygen/run_doxygen,v
retrieving revision 1.9
diff -u -3 -p -r1.9 run_doxygen
--- run_doxygen	2001/11/02 17:38:10	1.9
+++ run_doxygen	2001/11/24 03:21:46
@@ -4,7 +4,7 @@
 #
 # Synopsis:  run_doxygen --mode=[user|maint]  v3srcdir  v3builddir
 #
-# Originally hacked together by Phil Edwards <pme@sources.redhat.com>
+# Originally hacked together by Phil Edwards <pme@gcc.gnu.org>
 
 
 # We can check now that the version of doxygen is >= this variable.
@@ -161,6 +161,20 @@ for f in $problematic; do
     mv TEMP $f
 done
 rm stdheader
+
+# Some of the pages for generated modules have text that confuses certain
+# implementations of man(1), e.g., Linux's.  We need to have another top-level
+# *roff tag to /stop/ the .SH NAME entry.
+#problematic=`egrep --files-without-match '^\.SH SYNOPSIS' [A-Z]*.3`
+problematic='Containers.3 Sequences.3 Assoc_containers.3'
+for f in $problematic; do
+    sed '/^\.SH NAME/{
+n
+a\
+.SH SYNOPSIS
+    }' $f > TEMP
+    mv TEMP $f
+done
 
 cp ${srcdir}/docs/doxygen/Intro.3 .
 
Index: docs/doxygen/user.cfg.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/doxygen/user.cfg.in,v
retrieving revision 1.9
diff -u -3 -p -r1.9 user.cfg.in
--- user.cfg.in	2001/11/23 16:29:00	1.9
+++ user.cfg.in	2001/11/24 03:21:46
@@ -50,8 +50,8 @@ OUTPUT_LANGUAGE        = English
 # Private class members and static file members will be hidden unless 
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 
 
-#EXTRACT_ALL            = NO
-EXTRACT_ALL            = YES
+EXTRACT_ALL            = NO
+#EXTRACT_ALL            = YES
 
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
 # will be included in the documentation. 
@@ -125,7 +125,7 @@ INTERNAL_DOCS          = NO
 CLASS_DIAGRAMS         = YES
 
 # If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
+# be generated. Documented entities will be cross-referenced with these sources.
 
 SOURCE_BROWSER         = YES
 
@@ -234,7 +234,8 @@ GENERATE_BUGLIST       = YES
 # will result in a user defined paragraph with heading "Side Effects:". 
 # You can put \n's in the value part of an alias to insert newlines. 
 
-ALIASES                = 
+ALIASES                = "maint=\if maint" \
+                         "endmaint=\endif"
 
 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
 # the initial value of a variable or define consist of for it to appear in 
Index: docs/html/17_intro/TODO
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/17_intro/TODO,v
retrieving revision 1.1
diff -u -3 -p -r1.1 TODO
--- TODO	2000/12/10 04:03:09	1.1
+++ TODO	2001/11/24 03:21:46
@@ -152,8 +152,6 @@ sources, with macro-guards.
 
 - write filebuf for wide characters
 
-- replace stl/bits/stl_config 
-
 - add feature-test macros for non-standard extensions
 
 - move major extensions into separate namespace (e.g. stl::)
@@ -165,8 +163,6 @@ sources, with macro-guards.
 - specialize functions that use_facet<> calls on failure for the required 
   facets, and construct them lazily so unused facets need not be constructed 
   when the locale is. 
-
-- get mknumeric_limits coope with 'exotic' OSes.
 
 - <cmath>: provide missing names. 
 
Index: docs/html/faq/index.html
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/docs/html/faq/index.html,v
retrieving revision 1.27
diff -u -3 -p -r1.27 index.html
--- index.html	2001/11/23 16:29:01	1.27
+++ index.html	2001/11/24 03:21:46
@@ -99,7 +99,7 @@ http://gcc.gnu.org/onlinedocs/libstdc++/
 <h1><a name="1_0">1.0 General Information</a></h1>
 <!-- I suspect these will mostly be links to/into existing documents. -->
    <h2><a name="1_1">1.1 What is libstdc++-v3?</a></h2>
-      <p>The GNU Standard C++ Library v3, or libstdc++-2.9x, is an 
+      <p>The GNU Standard C++ Library v3 is an
          ongoing project to implement the ISO 14882 Standard C++ library 
          as described in chapters 17 through 27 and annex D.  As the 
          library reaches stable plateaus, it is captured in a snapshot
@@ -109,10 +109,15 @@ http://gcc.gnu.org/onlinedocs/libstdc++/
          far the project has come, or just want the latest
          bleeding-edge code, the up-to-date source is available over
          anonymous CVS, and can even be browsed over the Web (see below). 
-      </p> 
+      </p>
+      <p>The older libstdc++-v2 project is no longer maintained; the code
+         has been completely replaced and rewritten.
+         <a href="#4_4_interface">If you are using V2</a>, then you need to
+         report bugs to your system vendor, not to the V3 list.
+      </p>
       <p>A more formal description of the V3 goals can be found in the
          official <a href="../17_intro/DESIGN">design document</a>. 
-      </p> 
+      </p>
 
 <hr>
    <h2><a name="1_2">1.2 Why should I use libstdc++?</a></h2>
@@ -582,8 +587,10 @@ New:
            do anyhow; see the last paragraph of the page describing
          <a href="http://gcc.gnu.org/gnatswrite.html";>the GCC bug database</a>).
         </p>
-        <p>If the headers are in <CODE>${prefix}/include/g++-3</CODE>, then
-           you are using the old libstdc++-v2 library, which is nonstandard
+        <p>If the headers are in <code>${prefix}/include/g++-3</code>, or if
+           the installed library's name looks like <code>libstdc++-2.10.a</code>
+           or <code>libstdc++-libc6-2.10.so</code>,
+           then you are using the old libstdc++-v2 library, which is nonstandard
            and unmaintained.  Do not report problems with -v2 to the -v3
            mailing list.
         </p>
Index: include/backward/alloc.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/backward/alloc.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 alloc.h
--- alloc.h	2001/09/20 09:48:24	1.9
+++ alloc.h	2001/11/24 03:21:46
@@ -48,8 +48,8 @@
 #include <bits/stl_alloc.h>
 
 using std::__malloc_alloc_template; 
-using std::simple_alloc; 
-using std::debug_alloc; 
+using std::__simple_alloc; 
+using std::__debug_alloc; 
 using std::alloc; 
 using std::single_client_alloc; 
 using std::allocator;
Index: include/bits/stl_alloc.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_alloc.h,v
retrieving revision 1.10
diff -u -3 -p -r1.10 stl_alloc.h
--- stl_alloc.h	2001/11/15 08:52:23	1.10
+++ stl_alloc.h	2001/11/24 03:21:46
@@ -48,22 +48,34 @@
 #ifndef __SGI_STL_INTERNAL_ALLOC_H
 #define __SGI_STL_INTERNAL_ALLOC_H
 
-// This implements some standard node allocators.  These are
-// NOT the same as the allocators in the C++ draft standard or in
-// in the original STL.  They do not encapsulate different pointer
-// types; indeed we assume that there is only one pointer type.
-// The allocation primitives are intended to allocate individual objects,
-// not larger arenas as with the original STL allocators.
+// This header implements some node allocators.  These are NOT the same as
+// allocators in the C++ standard, nor in the original HP STL.  They do not
+// encapsulate different pointer types; we assume that there is only one
+// pointer type.  The C++ standard allocators are intended to allocate
+// individual objects, not pools or arenas.
+//
+// In this file allocators are of two different styles:  "standard" and
+// "SGI" (quotes included).  "Standard" allocators conform to 20.4.  "SGI"
+// allocators differ in AT LEAST the following ways (add to this list as you
+// discover them):
+//
+//  - "Standard" allocate() takes two parameters (n_count,hint=0) but "SGI"
+//    allocate() takes one paramter (n_size).
+//  - Likewise, "standard" deallocate()'s n is a count, but in "SGI" is a
+//    byte size.
+//  - max_size(), construct(), and destroy() are missing in "SGI" allocators.
+//  - reallocate(p,oldsz,newsz) is added in "SGI", and behaves as
+//    if p=realloc(p,newsz).
+
 
 #include <bits/functexcept.h>   // for __throw_bad_alloc
 #include <bits/std_cstddef.h>
 #include <bits/std_cstdlib.h>
 #include <bits/std_cstring.h>
 #include <bits/std_cassert.h>
-#ifndef __RESTRICT
-#  define __RESTRICT
-#endif
 
+// To see the effects of this block of macro wrangling, jump to
+// "Default node allocator" below.
 #ifdef __STL_THREADS
 # include <bits/stl_threads.h>
 # define __NODE_ALLOCATOR_THREADS true
@@ -78,15 +90,15 @@
 	// The above is copied from malloc.h.  Including <malloc.h>
 	// would be cleaner but fails with certain levels of standard
 	// conformance.
-#   define __NODE_ALLOCATOR_LOCK if (threads && __us_rsthread_malloc) \
+#   define __NODE_ALLOCATOR_LOCK if (__threads && __us_rsthread_malloc) \
                 { _S_node_allocator_lock._M_acquire_lock(); }
-#   define __NODE_ALLOCATOR_UNLOCK if (threads && __us_rsthread_malloc) \
+#   define __NODE_ALLOCATOR_UNLOCK if (__threads && __us_rsthread_malloc) \
                 { _S_node_allocator_lock._M_release_lock(); }
 # else /* !__STL_SGI_THREADS */
 #   define __NODE_ALLOCATOR_LOCK \
-        { if (threads) _S_node_allocator_lock._M_acquire_lock(); }
+        { if (__threads) _S_node_allocator_lock._M_acquire_lock(); }
 #   define __NODE_ALLOCATOR_UNLOCK \
-        { if (threads) _S_node_allocator_lock._M_release_lock(); }
+        { if (__threads) _S_node_allocator_lock._M_release_lock(); }
 # endif
 #else
 //  Thread-unsafe
@@ -97,7 +109,13 @@
 
 namespace std
 {
-  // A new-based allocator, as required by the standard.
+  /**
+   *  @maint
+   *  A new-based allocator, as required by the standard.  Allocation and
+   *  deallocation forward to global new and delete.  "SGI" style, minus
+   *  reallocate().
+   *  @endmaint
+  */
   class __new_alloc 
   {
   public:
@@ -110,8 +128,16 @@ namespace std
     { ::operator delete(__p); }
   };
   
-  // Malloc-based allocator.  Typically slower than default alloc below.
-  // Typically thread-safe and more storage efficient.
+
+  /**
+   *  @maint
+   *  A malloc-based allocator.  Typically slower than the
+   *  __default_alloc_template (below).  Typically thread-safe and more
+   *  storage efficient.  The template argument is unused and is only present
+   *  to permit multiple instantiations (but see __default_alloc_template
+   *  for caveats).  "SGI" style, plus __set_malloc_handler for OOM conditions.
+   *  @endmaint
+  */
   template <int __inst>
     class __malloc_alloc_template 
     {
@@ -191,127 +217,141 @@ namespace std
 	}
     }
 
-  // Determines the underlying allocator choice.
-# ifdef __USE_MALLOC
-  typedef __malloc_alloc_template<0> __mem_interface;
+
+// Determines the underlying allocator choice for the node allocator.
+#ifdef __USE_MALLOC
+  typedef __malloc_alloc_template<0>  __mem_interface;
 #else
-  typedef __new_alloc __mem_interface;
+  typedef __new_alloc                 __mem_interface;
 #endif
 
-template<class _Tp, class _Alloc>
-class simple_alloc {
 
-public:
+  /**
+   *  This is used primarily (only?) in _Alloc_traits and other places to
+   *  help provide the _Alloc_type typedef.
+   *
+   *  This is neither "standard"-conforming nor "SGI".  The _Alloc parameter
+   *  must be "SGI" style.
+  */
+  template<class _Tp, class _Alloc>
+  class __simple_alloc
+  {
+  public:
     static _Tp* allocate(size_t __n)
-      { return 0 == __n ? 0 : (_Tp*) _Alloc::allocate(__n * sizeof (_Tp)); }
-    static _Tp* allocate(void)
-      { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }
-    static void deallocate(_Tp* __p, size_t __n)
-      { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }
-    static void deallocate(_Tp* __p)
-      { _Alloc::deallocate(__p, sizeof (_Tp)); }
-};
+    { return 0 == __n ? 0 : (_Tp*) _Alloc::allocate(__n * sizeof (_Tp)); }
 
-// Allocator adaptor to check size arguments for debugging.
-// Reports errors using assert.  Checking can be disabled with
-// NDEBUG, but it's far better to just use the underlying allocator
-// instead when no checking is desired.
-// There is some evidence that this can confuse Purify.
-template <class _Alloc>
-class debug_alloc {
+    static _Tp* allocate()
+    { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }
 
-private:
-
-  enum {_S_extra = 8};  // Size of space used to store size.  Note
-                        // that this must be large enough to preserve
-                        // alignment.
-
-public:
+    static void deallocate(_Tp* __p, size_t __n)
+    { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }
 
-  static void* allocate(size_t __n)
-  {
-    char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra);
-    *(size_t*)__result = __n;
-    return __result + (int) _S_extra;
-  }
+    static void deallocate(_Tp* __p)
+    { _Alloc::deallocate(__p, sizeof (_Tp)); }
+  };
 
-  static void deallocate(void* __p, size_t __n)
-  {
-    char* __real_p = (char*)__p - (int) _S_extra;
-    assert(*(size_t*)__real_p == __n);
-    _Alloc::deallocate(__real_p, __n + (int) _S_extra);
-  }
 
-  static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz)
+  /**
+   *  An adaptor for an underlying allocator (_Alloc) to check the size
+   *  arguments for debugging.  Errors are reported using assert; these
+   *  checks can be disabled via NDEBUG, but the space penalty is still
+   *  paid, therefore it is far better to just use the underlying allocator
+   *  by itelf when no checking is desired.
+   *
+   *  "There is some evidence that this can confuse Purify." - SGI comment
+   *
+   *  This adaptor is "SGI" style.  The _Alloc parameter must also be "SGI".
+  */
+  template <class _Alloc>
+  class __debug_alloc
   {
-    char* __real_p = (char*)__p - (int) _S_extra;
-    assert(*(size_t*)__real_p == __old_sz);
-    char* __result = (char*)
-      _Alloc::reallocate(__real_p, __old_sz + (int) _S_extra,
-                                   __new_sz + (int) _S_extra);
-    *(size_t*)__result = __new_sz;
-    return __result + (int) _S_extra;
-  }
-
-};
+  private:
+    enum {_S_extra = 8};  // Size of space used to store size.  Note that this
+                          // must be large enough to preserve alignment.
+  
+  public:
+  
+    static void* allocate(size_t __n)
+    {
+      char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra);
+      *(size_t*)__result = __n;
+      return __result + (int) _S_extra;
+    }
+  
+    static void deallocate(void* __p, size_t __n)
+    {
+      char* __real_p = (char*)__p - (int) _S_extra;
+      assert(*(size_t*)__real_p == __n);
+      _Alloc::deallocate(__real_p, __n + (int) _S_extra);
+    }
+  
+    static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz)
+    {
+      char* __real_p = (char*)__p - (int) _S_extra;
+      assert(*(size_t*)__real_p == __old_sz);
+      char* __result = (char*)
+        _Alloc::reallocate(__real_p, __old_sz + (int) _S_extra,
+                                     __new_sz + (int) _S_extra);
+      *(size_t*)__result = __new_sz;
+      return __result + (int) _S_extra;
+    }
+  };
 
 
-# ifdef __USE_MALLOC
+#ifdef __USE_MALLOC
 
 typedef __mem_interface alloc;
 typedef __mem_interface single_client_alloc;
 
-# else
-
-
-// Default node allocator.
-// With a reasonable compiler, this should be roughly as fast as the
-// original STL class-specific allocators, but with less fragmentation.
-// Default_alloc_template parameters are experimental and MAY
-// DISAPPEAR in the future.  Clients should just use alloc for now.
-//
-// Important implementation properties:
-// 1. If the client request an object of size > _MAX_BYTES, the resulting
-//    object will be obtained directly from malloc.
-// 2. In all other cases, we allocate an object of size exactly
-//    _S_round_up(requested_size).  Thus the client has enough size
-//    information that we can return the object to the proper free list
-//    without permanently losing part of the object.
-//
+#else
 
-// The first template parameter specifies whether more than one thread
-// may use this allocator.  It is safe to allocate an object from
-// one instance of a default_alloc and deallocate it with another
-// one.  This effectively transfers its ownership to the second one.
-// This may have undesirable effects on reference locality.
-// The second parameter is unreferenced and serves only to allow the
-// creation of multiple default_alloc instances.
-// Node that containers built on different allocator instances have
-// different types, limiting the utility of this approach.
 
-template <bool threads, int inst>
-class __default_alloc_template {
+/**
+ *  @maint
+ *  Default node allocator.
+ * 
+ *  Important implementation properties:
+ *  1. If the clients request an object of size > _MAX_BYTES, the resulting
+ *     object will be obtained directly from malloc.
+ *  2. In all other cases, we allocate an object of size exactly
+ *     _S_round_up(requested_size).  Thus the client has enough size
+ *     information that we can return the object to the proper free list
+ *     without permanently losing part of the object.
+ * 
+ *  The first template parameter specifies whether more than one thread may
+ *  use this allocator.  It is safe to allocate an object from one instance
+ *  of a default_alloc and deallocate it with another one.  This effectively
+ *  transfers its ownership to the second one.  This may have undesirable
+ *  effects on reference locality.
+ *
+ *  The second parameter is unused and serves only to allow the creation of
+ *  multiple default_alloc instances.  Note that containers built on different
+ *  allocator instances have different types, limiting the utility of this
+ *  approach.  If you do not wish to share the free lists with the main
+ *  default_alloc instance, instantiate this with a non-zero __inst.
+ *  @endmaint
+*/
+template <bool __threads, int __inst>
+class __default_alloc_template
+{
 
 private:
-  // Really we should use static const int x = N
-  // instead of enum { x = N }, but few compilers accept the former.
   enum {_ALIGN = 8};
   enum {_MAX_BYTES = 128};
   enum {_NFREELISTS = 16}; // _MAX_BYTES/_ALIGN
+
   static size_t
   _S_round_up(size_t __bytes) 
     { return (((__bytes) + (size_t) _ALIGN-1) & ~((size_t) _ALIGN - 1)); }
 
   union _Obj {
-        union _Obj* _M_free_list_link;
-        char _M_client_data[1];    /* The client sees this.        */
+    union _Obj* _M_free_list_link;
+    char        _M_client_data[1];    // The client sees this.
   };
 
   static _Obj* volatile _S_free_list[]; 
-        // Specifying a size results in duplicate def for 4.1
-  static  size_t _S_freelist_index(size_t __bytes) {
-        return (((__bytes) + (size_t)_ALIGN-1)/(size_t)_ALIGN - 1);
-  }
+  static size_t _S_freelist_index(size_t __bytes)
+    { return (((__bytes) + (size_t)_ALIGN-1)/(size_t)_ALIGN - 1); }
 
   // Returns an object of size __n, and optionally adds to size __n free list.
   static void* _S_refill(size_t __n);
@@ -324,24 +364,24 @@ private:
   static char* _S_end_free;
   static size_t _S_heap_size;
 
-# ifdef __STL_THREADS
+#ifdef __STL_THREADS
     static _STL_mutex_lock _S_node_allocator_lock;
-# endif
+#endif
 
-    // It would be nice to use _STL_auto_lock here.  But we
-    // don't need the NULL check.  And we do need a test whether
-    // threads have actually been started.
-    class _Lock;
-    friend class _Lock;
-    class _Lock {
-        public:
-            _Lock() { __NODE_ALLOCATOR_LOCK; }
-            ~_Lock() { __NODE_ALLOCATOR_UNLOCK; }
-    };
+  // It would be nice to use _STL_auto_lock here.  But we
+  // don't need the NULL check.  And we do need a test whether
+  // threads have actually been started.
+  class _Lock;
+  friend class _Lock;
+  class _Lock {
+    public:
+      _Lock() { __NODE_ALLOCATOR_LOCK; }
+      ~_Lock() { __NODE_ALLOCATOR_UNLOCK; }
+  };
 
 public:
 
-  /* __n must be > 0      */
+  // __n must be > 0
   static void* allocate(size_t __n)
   {
     void* __ret = 0;
@@ -358,7 +398,7 @@ public:
 	/*REFERENCED*/
 	_Lock __lock_instance;
 #     endif
-	_Obj* __RESTRICT __result = *__my_free_list;
+	_Obj* __restrict__ __result = *__my_free_list;
 	if (__result == 0)
 	  __ret = _S_refill(_S_round_up(__n));
 	else 
@@ -371,7 +411,7 @@ public:
     return __ret;
   };
 
-  /* __p may not be 0 */
+  // __p may not be 0
   static void deallocate(void* __p, size_t __n)
   {
     if (__n > (size_t) _MAX_BYTES)
@@ -396,8 +436,6 @@ public:
   static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz);
 };
 
-typedef __default_alloc_template<__NODE_ALLOCATOR_THREADS, 0> alloc;
-typedef __default_alloc_template<false, 0> single_client_alloc;
 
 template <bool __threads, int __inst>
 inline bool operator==(const __default_alloc_template<__threads, __inst>&,
@@ -414,11 +452,9 @@ inline bool operator!=(const __default_a
 }
 
 
-
-/* We allocate memory in large chunks in order to avoid fragmenting     */
-/* the malloc heap too much.                                            */
-/* We assume that size is properly aligned.                             */
-/* We hold the allocation lock.                                         */
+// We allocate memory in large chunks in order to avoid fragmenting the
+// malloc heap (or whatever __mem_interface is using) too much.  We assume
+// that __size is properly aligned.  We hold the allocation lock.
 template <bool __threads, int __inst>
 char*
 __default_alloc_template<__threads, __inst>::_S_chunk_alloc(size_t __size, 
@@ -492,9 +528,8 @@ __default_alloc_template<__threads, __in
 }
 
 
-/* Returns an object of size __n, and optionally adds to size __n free list.*/
-/* We assume that __n is properly aligned.                                */
-/* We hold the allocation lock.                                         */
+// Returns an object of size __n, and optionally adds to "size __n"'s free list.
+// We assume that __n is properly aligned.  We hold the allocation lock.
 template <bool __threads, int __inst>
 void*
 __default_alloc_template<__threads, __inst>::_S_refill(size_t __n)
@@ -526,6 +561,7 @@ __default_alloc_template<__threads, __in
     return(__result);
 }
 
+
 template <bool threads, int inst>
 void*
 __default_alloc_template<threads, inst>::reallocate(void* __p,
@@ -567,23 +603,35 @@ template <bool __threads, int __inst>
 typename __default_alloc_template<__threads, __inst>::_Obj* volatile
 __default_alloc_template<__threads, __inst> ::_S_free_list[
     __default_alloc_template<__threads, __inst>::_NFREELISTS
-] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
-// The 16 zeros are necessary to make version 4.1 of the SunPro
-// compiler happy.  Otherwise it appears to allocate too little
-// space for the array.
+] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
+
+// __NODE_ALLOCATOR_THREADS is predicated on __STL_THREADS being defined or not
+typedef __default_alloc_template<__NODE_ALLOCATOR_THREADS, 0> alloc;
+typedef __default_alloc_template<false, 0> single_client_alloc;
+
+
 #endif /* ! __USE_MALLOC */
 
-// This implements allocators as specified in the C++ standard.  
-//
-// Note that standard-conforming allocators use many language features
-// that are not yet widely implemented.  In particular, they rely on
-// member templates, partial specialization, partial ordering of function
-// templates, the typename keyword, and the use of the template keyword
-// to refer to a template member of a dependent type.
 
+/**
+ *  This is a "standard" allocator, as per [20.4].  The private _Alloc is
+ *  "SGI" style.  (See comments at the top of stl_alloc.h.)
+ *
+ *  The underlying allocator behaves as follows.
+ *  - if __USE_MALLOC then
+ *    - thread safety depends on malloc and is entirely out of our hands
+ *    - __malloc_alloc_template is used for memory requests
+ *  - else (the default)
+ *    - __default_alloc_template is used via two typedefs
+ *    - "single_client_alloc" typedef does no locking for threads
+ *    - "alloc" typedef is threadsafe via the locks
+ *    - __new_alloc is used for memory requests
+ *
+*/
 template <class _Tp>
-class allocator {
+class allocator
+{
   typedef alloc _Alloc;          // The underlying allocator.
 public:
   typedef size_t     size_type;
@@ -651,15 +699,18 @@ inline bool operator!=(const allocator<_
   return false;
 }
 
-// Allocator adaptor to turn an SGI-style allocator (e.g. alloc, malloc_alloc)
-// into a standard-conforming allocator.   Note that this adaptor does
-// *not* assume that all objects of the underlying alloc class are
-// identical, nor does it assume that all of the underlying alloc's
-// member functions are static member functions.  Note, also, that 
-// __allocator<_Tp, alloc> is essentially the same thing as allocator<_Tp>.
 
+/**
+ *  Allocator adaptor to turn an "SGI" style allocator (e.g. alloc,
+ *  __malloc_alloc_template) into a "standard" conformaing allocator.  Note
+ *  that this adaptor does *not* assume that all objects of the underlying
+ *  alloc class are identical, nor does it assume that all of the underlying
+ *  alloc's member functions are static member functions.  Note, also, that
+ *  __allocator<_Tp, alloc> is essentially the same thing as allocator<_Tp>.
+*/
 template <class _Tp, class _Alloc>
-struct __allocator {
+struct __allocator
+{
   _Alloc __underlying_alloc;
 
   typedef size_t    size_type;
@@ -730,6 +781,7 @@ inline bool operator!=(const __allocator
   return __a1.__underlying_alloc != __a2.__underlying_alloc;
 }
 
+
 // Comparison operators for all of the predifined SGI-style allocators.
 // This ensures that __allocator<malloc_alloc> (for example) will
 // work correctly.
@@ -749,17 +801,18 @@ inline bool operator!=(const __malloc_al
 }
 
 template <class _Alloc>
-inline bool operator==(const debug_alloc<_Alloc>&,
-                       const debug_alloc<_Alloc>&) {
+inline bool operator==(const __debug_alloc<_Alloc>&,
+                       const __debug_alloc<_Alloc>&) {
   return true;
 }
 
 template <class _Alloc>
-inline bool operator!=(const debug_alloc<_Alloc>&,
-                       const debug_alloc<_Alloc>&) {
+inline bool operator!=(const __debug_alloc<_Alloc>&,
+                       const __debug_alloc<_Alloc>&) {
   return false;
 }
 
+
 // Another allocator adaptor: _Alloc_traits.  This serves two
 // purposes.  First, make it possible to write containers that can use
 // either SGI-style allocators or standard-conforming allocator.
@@ -804,7 +857,7 @@ template <class _Tp, class _Tp1>
 struct _Alloc_traits<_Tp, allocator<_Tp1> >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, alloc> _Alloc_type;
+  typedef __simple_alloc<_Tp, alloc> _Alloc_type;
   typedef allocator<_Tp> allocator_type;
 };
 
@@ -814,7 +867,7 @@ template <class _Tp, int __inst>
 struct _Alloc_traits<_Tp, __malloc_alloc_template<__inst> >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
+  typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
   typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
 };
 
@@ -823,7 +876,7 @@ template <class _Tp, bool __threads, int
 struct _Alloc_traits<_Tp, __default_alloc_template<__threads, __inst> >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, __default_alloc_template<__threads, __inst> > 
+  typedef __simple_alloc<_Tp, __default_alloc_template<__threads, __inst> > 
           _Alloc_type;
   typedef __allocator<_Tp, __default_alloc_template<__threads, __inst> > 
           allocator_type;
@@ -831,11 +884,11 @@ struct _Alloc_traits<_Tp, __default_allo
 #endif
 
 template <class _Tp, class _Alloc>
-struct _Alloc_traits<_Tp, debug_alloc<_Alloc> >
+struct _Alloc_traits<_Tp, __debug_alloc<_Alloc> >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, debug_alloc<_Alloc> > _Alloc_type;
-  typedef __allocator<_Tp, debug_alloc<_Alloc> > allocator_type;
+  typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
+  typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
 };
 
 // Versions for the __allocator adaptor used with the predefined
@@ -846,7 +899,7 @@ struct _Alloc_traits<_Tp, 
                      __allocator<_Tp1, __malloc_alloc_template<__inst> > >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
+  typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
   typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
 };
 
@@ -857,7 +910,7 @@ struct _Alloc_traits<_Tp, 
                                   __default_alloc_template<__thr, __inst> > >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, __default_alloc_template<__thr,__inst> > 
+  typedef __simple_alloc<_Tp, __default_alloc_template<__thr,__inst> > 
           _Alloc_type;
   typedef __allocator<_Tp, __default_alloc_template<__thr,__inst> > 
           allocator_type;
@@ -865,11 +918,11 @@ struct _Alloc_traits<_Tp, 
 #endif
 
 template <class _Tp, class _Tp1, class _Alloc>
-struct _Alloc_traits<_Tp, __allocator<_Tp1, debug_alloc<_Alloc> > >
+struct _Alloc_traits<_Tp, __allocator<_Tp1, __debug_alloc<_Alloc> > >
 {
   static const bool _S_instanceless = true;
-  typedef simple_alloc<_Tp, debug_alloc<_Alloc> > _Alloc_type;
-  typedef __allocator<_Tp, debug_alloc<_Alloc> > allocator_type;
+  typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
+  typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
 };
 
 } // namespace std
Index: include/bits/stl_construct.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_construct.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 stl_construct.h
--- stl_construct.h	2001/11/02 17:38:11	1.9
+++ stl_construct.h	2001/11/24 03:21:46
@@ -67,10 +67,10 @@
 namespace std
 {
   /**
-   * Invoke an allocated object's constructor with an initializer.
-   *
-   * This function is not part of the C++ standard but is used internally
-   * within the library.
+   * @maint
+   * Constructs an object in existing memory by invoking an allocated
+   * object's constructor with an initializer.
+   * @endmaint
    */
   template <class _T1, class _T2>
     inline void
@@ -78,10 +78,10 @@ namespace std
     { new (static_cast<void*>(__p)) _T1(__value); }
   
   /**
-   * Invoke an allocated object's constructor without an initializer.
-   *
-   * This function is not part of the C++ standard but is used internally
-   * within the library.
+   * @maint
+   * Constructs an object in existing memory by invoking an allocated
+   * object's default constructor (no initializers).
+   * @endmaint
    */
   template <class _T1>
     inline void
@@ -89,9 +89,11 @@ namespace std
     { new (static_cast<void*>(__p)) _T1(); }
 
   /**
+   * @maint
    * Destroy a range of objects with nontrivial destructors.  
    *
    * This is a helper function used only by _Destroy().
+   * @endmaint
    */
   template <class _ForwardIterator>
     inline void
@@ -99,11 +101,13 @@ namespace std
     { for ( ; __first != __last; ++__first) _Destroy(&*__first); }
 
   /**
+   * @maint
    * Destroy a range of objects with trivial destructors.  Since the destructors
    * are trivial, there's nothing to do and hopefully this function will be
    * entirely optimized away.
    *
    * This is a helper function used only by _Destroy().
+   * @endmaint
    */
   template <class _ForwardIterator> 
     inline void
@@ -111,10 +115,9 @@ namespace std
     { }
 
   /**
+   * @maint
    * Destroy the object pointed to by a pointer type.
-   *
-   * This function is not part of the C++ standard but is used internally
-   * within the library.
+   * @endmaint
    */
   template <class _Tp>
     inline void
@@ -122,12 +125,11 @@ namespace std
     { __pointer->~_Tp(); }
   
   /**
+   * @maint
    * Destroy a range of objects.  If the value_type of the object has
    * a trivial destructor, the compiler should optimize all of this
    * away, otherwise the objects' destructors must be invoked.
-   *
-   * This function is not part of the C++ standard but is used internally
-   * within the library.
+   * @endmaint
    */
   template <class _ForwardIterator>
     inline void


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]