The new-style headers are fully supported in libstdc++-v3. The compiler
- itself fully supports namespaces. However, at the moment, the compiler
- treats std:: as the global namespace by default.
+ itself fully supports namespaces, including std::.
For those of you new to ISO C++98, no, that isn't a typo, the headers
really have new names. Marshall Cline's C++ FAQ Lite has a good
@@ -145,7 +144,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:54 pme Exp $
+ $Id: howto.html,v 1.3 2001/05/30 08:30:02 ljrittle Exp $
diff --git a/libstdc++-v3/docs/html/18_support/howto.html b/libstdc++-v3/docs/html/18_support/howto.html
index f2b5d88..154177b 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
-
+
@@ -186,6 +186,11 @@
out of them, Bad Things happen.
+
Note also that atexit() is only required to store 32
+ functions, and the compiler/library might already be using some of
+ those slots. If you think you may run out, we recommend using
+ the xatexit/xexit combination from libiberty, which has no such limit.
+
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.1 2000/12/10 04:04:54 pme Exp $
+ $Id: howto.html,v 1.2 2001/04/03 00:26:55 pme Exp $
diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html
index 26ba4cd..27e6361 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
-
+
@@ -93,16 +93,8 @@
object file. The checks are also cleaner and easier to read and
understand.
-
Concept checking can be disabled when you build your code, for example,
- to save space during a production build. Just define (via -D or
- #define) any of the macros
- _GLIBCPP_NO_CONCEPT_CHECKS (yes, with the leading underscore),
- _STL_NO_CONCEPT_CHECKS (also with the leading underscore),
- or NDEBUG. The first macro is specifically for this
- feature, the second is the disabling macro for the replaced SGI
- version (some code may assume SGI's version is in use), and the third
- is the usual macro to disable assert(), which is often turned
- off for production builds.
+
Right now they are off by default. More will be added once
+ GCC 3.0 is released and we have time to revisit this topic.
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.2 2001/03/25 00:01:56 pme Exp $
+ $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $
Note the const keyword; the object being copied shouldn't change.
@@ -120,23 +120,10 @@
void f()
{
- std::vector< std::auto_ptr<int> > vec_ap_int;
+ std::vector< std::auto_ptr<int> > vec_ap_int;
}
- Should you try this, you will see an error along the lines of the
- following (look through the ugly line-wrapping):
-
-/installdir/include/g++-v3/bits/concept_checks.h: In
- static member function `static _Type
- _STL_ERROR::__const_parameter_required_for_copy_constructor(_Type, const
- _Type&) [with _Type = std::auto_ptr<int>]':
-/installdir/include/g++-v3/bits/concept_checks.h:383: passing
- `const std::auto_ptr<int>' as `this' argument of
- `std::auto_ptr<_Tp>::operator std::auto_ptr_ref<_Tp1>()
- [with _Tp1 = int, _Tp = int]' discards qualifiers
-
- See the highlighted error? It starts with a message in all caps
- to get your attention.
+ Should you try this with the checks enabled, you will see an error.
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.2 2001/01/23 17:02:27 pme Exp $
+ $Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $
diff --git a/libstdc++-v3/docs/html/23_containers/howto.html b/libstdc++-v3/docs/html/23_containers/howto.html
index f9d0431..603c499 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
-
+
@@ -45,10 +45,8 @@
algorithms are only given endpoints to work with. For the container
classes, these are iterators (usually begin() and
end(), but not always). For builtin arrays, these are
- the address of the first element and the past-the-end element.
-
+ the address of the first element and the
+ past-the-end element.
Some very simple wrapper functions can hide all of that from the
rest of the code. For example, a pair of functions called
@@ -86,7 +84,7 @@
+ inline unsigned int lengthof (T (&)[sz]) { return sz; }
looks just weird! Hint: unused parameters can be left nameless.
Return to top of page or
@@ -134,7 +132,7 @@
some extra space, of course. (If you plan to write code like the
incorrect example above, where the bitset is a local variable, then you
may have to talk your compiler into allowing that much stack space;
- there may be zero spae overhead, but it's all allocated inside the
+ there may be zero space overhead, but it's all allocated inside the
object.)
A container<bool>. The Committee made provision
@@ -239,7 +237,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 08:30:01 ljrittle Exp $
This starts off sounding complicated, but is actually very easy,
+ especially towards the end. Trust me.
+
+
Beginners usually have a little trouble understand the whole
+ 'past-the-end' thing, until they remember their early algebra classes
+ (see, they told you that stuff would come in handy!) and
+ the concept of half-open ranges.
+
+
First, some history, and a reminder of some of the funkier rules in
+ C and C++ for builtin arrays. The following rules have always been
+ true for both languages:
+
+
You can point anywhere in the array, or to the first element
+ past the end of the array. A pointer that points to one
+ past the end of the array is guaranteed to be as unique as a
+ pointer to somewhere inside the array, so that you can compare
+ such pointers safely.
+
You can only dereference a pointer that points into an array.
+ If your array pointer points outside the array -- even to just
+ one past the end -- and you dereference it, Bad Things happen.
+
Strictly speaking, simply pointing anywhere else invokes
+ undefined behavior. Most programs won't puke until such a
+ pointer is actually dereferenced, but the standards leave that
+ up to the platform.
+
+ The reason this past-the-end addressing was allowed is to make it
+ easy to write a loop to go over an entire array, e.g.,
+ while (*d++ = *s++);.
+
+
So, when you think of two pointers delimiting an array, don't think
+ of them as indexing 0 through n-1. Think of them as boundary
+ markers:
+
+
+ beginning end
+ | |
+ | | This is bad. Always having to
+ | | remember to add or subtract one.
+ | | Off-by-one bugs very common here.
+ V V
+ array of N elements
+ |---|---|--...--|---|---|
+ | 0 | 1 | ... |N-2|N-1|
+ |---|---|--...--|---|---|
+
+ ^ ^
+ | |
+ | | This is good. This is safe. This
+ | | is guaranteed to work. Just don't
+ | | dereference 'end'.
+ beginning end
+
+
+ See? Everything between the boundary markers is part of the array.
+ Simple.
+
+
Now think back to your junior-high school algebra course, when you
+ were learning how to draw graphs. Remember that a graph terminating
+ with a solid dot meant, "Everything up through this point,"
+ and a graph terminating with an open dot meant, "Everything up
+ to, but not including, this point," respectively called closed
+ and open ranges? Remember how closed ranges were written with
+ brackets, [a,b], and open ranges were written with parentheses,
+ (a,b)?
+
+
The boundary markers for arrays describe a half-open range,
+ starting with (and including) the first element, and ending with (but
+ not including) the last element: [beginning,end). See, I
+ told you it would be simple in the end.
+
+
Iterators, and everything working with iterators, follows this same
+ time-honored tradition. A container's begin() method returns
+ an iterator referring to the first element, and its end()
+ method returns a past-the-end iterator, which is guaranteed to be
+ unique and comparable against any other iterator pointing into the
+ middle of the container.
+
+
Container constructors, container methods, and algorithms, all take
+ pairs of iterators describing a range of values on which to operate.
+ All of these ranges are half-open ranges, so you pass the beginning
+ iterator as the starting parameter, and the one-past-the-end iterator
+ as the finishing parameter.
+
+
This generalizes very well. You can operate on sub-ranges quite
+ easily this way; functions accepting a [first,last) range
+ don't know or care whether they are the boundaries of an entire {array,
+ sequence, container, whatever}, or whether they only enclose a few
+ elements from the center. This approach also makes zero-length
+ sequences very simple to recognize: if the two endpoints compare
+ equal, then the {array, sequence, container, whatever} is empty.
+
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
+ $Id: howto.html,v 1.2 2001/04/03 00:26:56 pme Exp $
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.
+ these algorithms. Raw pointers make great candidates, thus
+ built-in arrays are fine containers. So do your own iterators.
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
- a container, then anything outside that range is inviolate.
+ whole; only the things between the two iterator endpoints. If
+ you pass a range of iterators only enclosing the middle third of
+ a container, then anything outside that range is inviolate.
Even strings can be fed through the algorithms here, although the
@@ -59,7 +59,7 @@
The single thing that trips people up the most is the definition of
range used with iterators; the famous
"past-the-end" rule that everybody loves to hate. The
- iterators chapter of this
+ iterators chapter of this
document has a complete explanation of this simple rule that seems to
cause so much confusion. Once you get range into your head
(it's not that hard, honest!), then the algorithms are a cakewalk.
@@ -87,7 +87,7 @@
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.1 2000/12/10 04:04:55 pme Exp $
+ $Id: howto.html,v 1.2 2001/04/03 00:26:56 pme Exp $
In addition to the other topics on this page, we'll note here some
+ of the C99 features that appear in libstdc++-v3.
+
+
The C99 features depend on the --enable-c99 configure flag.
+ This flag is already on by default, but it can be disabled by the
+ user. Also, the configuration machinery will disable it if the
+ neccessary support for C99 (e.g., header files) cannot be found.
+
+
As of GCC 3.0, C99 support includes classification functions
+ such as isnormal, isgreater, isnan, etc.
+ The functions used for 'long long' support such as strtoll
+ are supported, as is the lldiv_t typedef. Also supported
+ are the wide character functions using 'long long', like
+ wcstoll.
+
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.1 2000/12/10 04:04:56 pme Exp $
+ $Id: howto.html,v 1.2 2001/04/03 00:26:56 pme Exp $
The diagram is in PDF. Rumor
- has it that once Benjamin Kosnik has been dead for a few decades,
- this work of his will be hung next to the Mona Lisa in the
- Musee du Louvre.
-
Stringstreams (defined in the header <sstream>)
are in this author's opinion one of the coolest things since
@@ -416,7 +407,7 @@
Comments and suggestions are welcome, and may be sent to
the mailing list.
- $Id: howto.html,v 1.3 2001/02/07 00:03:21 pme Exp $
+ $Id: howto.html,v 1.4 2001/04/03 00:26:56 pme Exp $
RU_+s_\t&T5Y`>dV]'S-k@"Q_kM?n_.I&4da\chQkMCLk)1%@f4\9GX#!HfnpZSEd
5B4@A0t)n-ciJ-WAjb9Ai!?.?F9;/<=hf^D5%cfket6q?T``S$NEX'@qD/F@qIuIR-.3o33<0"0Z2*C&
](Tdo:@SsHBq*3gY@lfrQ[90l\$q+^c-^g0-3t+"EZa%<[+CI;?,F"&F!tPGJGBK!YuEtS^Mj9R"Iekj
ftBa(*OOrY;2DU%`o3kZF#L!cVp0L-BKO8n.PU;?r:TE:TE=Ug9K7
!N&L88e(4u=W"i,"cZ?qFSk8.n>E?ad$qUprd3T>7CH16s
4(],a>iE0c7#WqRT.IqDUJll/WsBaY+eHbLpWU#QjTQ0aoa,:UJ=/+5M2!W7E1fE,-t0eH+m<,]+hjGn
M'aa8e_U[@eh1I)Cd!4MWnHO2i]&!)gJ`E;)5'Y;lfW-c`Rrmh7SCpj.DWjc(`,PSO_oPJbKPG/RJ6HG&htqbr484ODB,["l69o4n9F
i)8b-L%'&bR!>dH;\*!YB"Io8>$Wu.S,QU.iO`0ZY;Mu(')F>_.g?f&Kq^t6a\op<%ifGI2?T1@\fU!E4Q_?<[Fg&Df40DH29ln?<1(*I(
*NMEfeVDBiQ[)(Ind`qAo(c4L3/+\H8?^>$PP"*O-o0p2HN^\%3V9r`NO/"VWSQH=-iXDQ?kBF~>
endstream
endobj
7 0 obj
<<
/Type /Font
/Subtype /Type1
/Name /F0
/BaseFont /Helvetica
/Encoding /MacRomanEncoding
>>
endobj
xref
0 8
0000000000 65535 f
0000000009 00000 n
0000000058 00000 n
0000000115 00000 n
0000000298 00000 n
0000000384 00000 n
0000000353 00000 n
0000005005 00000 n
trailer
<<
/Root 1 0 R
/Size 8
>>
startxref
5113
%%EOF
\ No newline at end of file
diff --git a/libstdc++-v3/docs/html/documentation.html b/libstdc++-v3/docs/html/documentation.html
index 7af16b0..2a16a84 100644
--- a/libstdc++-v3/docs/html/documentation.html
+++ b/libstdc++-v3/docs/html/documentation.html
@@ -3,7 +3,7 @@
Standard C++ Library v3
-
+
@@ -11,15 +11,42 @@
All of these documents (in fact, this entire homepage set) are
bundled with the library source, under the docs subdirectory,
for releases and snapshots. The sole exception is the
- automatically-generated source documentation,
- available separately.
+ automatically-generated source documentation, available separately.
In addition to the distribution documentation (these pages), we also
+ have a set of HTML documents generated from the sources themselves,
+ using the Doxygen tool. These are useful for examining the signatures
+ of public member functions for the library classes, etc.
+
+
+ The latest collection is libstdc++-doxygen-20010501.tar.gz (3.7MB),
+ viewable online.
+ The collection is also available in the libstdc++ snapshots directory at
+ <URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/>. You will
+ almost certainly need to use one of the
+ mirror sites to download
+ the tarball. After unpacking, simply load
+ libstdc++-doxygen-20010501/index.html
+ in a browser. Feedback (and additional documentation!) is welcome.
+
In addition to the distribution documentation (these pages), we also
- have a set of HTML documents generated from the sources themselves,
- using the Doxygen tool. These are useful for examining the signatures
- of public member functions for the library classes, etc.
-
-
- The latest
- collection is libstdc++-doxygen-20010501.tar.gz (3.7MB), available in
- the libstdc++ snapshots directory at
- <URL:ftp://gcc.gnu.org/pub/gcc/libstdc++/>. You will
- almost certainly need to use one of the
- mirror sites to download
- the tarball. After unpacking, simply load
- libstdc++-doxygen-20010501/index.html in a browser. You can also
- browse the same collection
- online.
- Feedback (and additional documentation!) is welcome.
-