OSDN Git Service

2001-07-18 Phil Edwards <pme@sources.redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / docs / html / faq / index.html
1 <HTML>
2 <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4    <META NAME="KEYWORDS" CONTENT="libstdc++, libstdc++-v3, GCC, g++, libg++, STL">
5    <META NAME="DESCRIPTION" CONTENT="FAQ for the GNU libstdc++ effort.">
6    <TITLE>libstdc++-v3 FAQ</TITLE>
7 <LINK REL=StyleSheet HREF="../lib3styles.css">
8 <!-- 
9   ** Locations of "the most recent snapshot is the Nth" text are 
10   ** answers 1_1, 1_4, 4_1, 5_6.
11 -->
12 <!-- $Id: index.html,v 1.9 2001/05/30 21:55:04 pme Exp $ -->
13 </HEAD>
14 <BODY>
15
16 <H1 CLASS="centered">libstdc++ Frequently Asked Questions</H1>
17
18 <P>The latest version of this document is always available at
19 <A HREF="http://gcc.gnu.org/onlinedocs/libstdc++/faq/">
20 http://gcc.gnu.org/onlinedocs/libstdc++/faq/</A>.</P>
21
22 <P>To the <A HREF="http://gcc.gnu.org/libstdc++/">libstdc++-v3 homepage</A>.
23
24 <!-- ####################################################### -->
25 <HR>
26 <H1>Questions</H1>
27 <OL>
28    <LI><A HREF="#1_0">General Information</A>
29    <!-- I suspect these will mostly be links to/into existing documents. -->
30    <OL>
31       <LI><A HREF="#1_1">What is libstdc++-v3?</A>
32       <LI><A HREF="#1_2">Why should I use libstdc++?</A>
33       <LI><A HREF="#1_3">Who's in charge of it?</A>
34       <LI><A HREF="#1_4">How do I get libstdc++?</A>
35       <LI><A HREF="#1_5">When is libstdc++ going to be finished?</A>
36       <LI><A HREF="#1_6">How do I contribute to the effort?</A>
37       <LI><A HREF="#1_7">What happened to libg++?  I need that!</A>
38       <LI><A HREF="#1_8">What if I have more questions?</A>
39    </OL>
40
41    <LI><A HREF="#2_0">Installation</A>
42       <OL>
43          <LI><A HREF="#2_1">How do I install libstdc++-v3?</A>
44          <LI><A HREF="#2_2">[removed]</A>
45          <LI><A HREF="#2_3">What is this CVS thing that you keep 
46                             mentioning?</A>
47          <LI><A HREF="#2_4">How do I know if it works?</A>
48       </OL>
49
50    <LI><A HREF="#3_0">Platform-Specific Issues</A>
51       <OL>
52          <LI><A HREF="#3_1">Can libstdc++-v3 be used with &lt;my
53                             favorite compiler&gt;?</A>
54          <LI><A HREF="#3_2">[removed]</A>
55          <LI><A HREF="#3_3">Building under DEC OSF kills the assembler</A>
56       </OL>
57
58    <LI><A HREF="#4_0">Known Bugs and Non-Bugs</A>
59       <OL>
60          <LI><A HREF="#4_1">What works already?</A>
61          <LI><A HREF="#4_2">Bugs in gcc/g++ (not libstdc++-v3)</A>
62          <LI><A HREF="#4_3">Bugs in the C++ language/lib specification</A>
63          <LI><A HREF="#4_4">Things in libstdc++ that look like bugs</A>
64            <UL>
65              <LI><A HREF="#4_4_Weff">-Weffc++ complains too much</A>
66              <LI><A HREF="#4_4_rel_ops">&quot;ambiguous overloads&quot;
67                                  after including an old-style header</A>
68              <LI><A HREF="#4_4_interface">The g++-3 headers are
69                                  <STRONG>not ours</STRONG></A>
70              <LI><A HREF="#4_4_glibc">compilation errors from streambuf.h</A>
71              <LI><A HREF="#4_4_checks">errors about <EM>*Cconcept</EM> and
72                                  <EM>constraints</EM> in the STL...</A>
73            </UL>
74          <LI><A HREF="#4_5">Aw, that's easy to fix!</A>
75       </OL>
76
77    <LI><A HREF="#5_0">Miscellaneous</A>
78       <OL>
79          <LI><A HREF="#5_1">string::iterator is not char*;
80                             vector&lt;T&gt;::iterator is not T*</A>
81          <LI><A HREF="#5_2">What's next after libstdc++-v3?</A>
82          <LI><A HREF="#5_3">What about the STL from SGI?</A>
83          <LI><A HREF="#5_4">Extensions and Backward Compatibility</A>
84          <LI><A HREF="#5_5">[removed]</A>
85          <LI><A HREF="#5_6">Is libstdc++-v3 thread-safe?</A>
86          <LI><A HREF="#5_7">How do I get a copy of the ISO C++ Standard?</A>
87       </OL>
88
89 </OL>
90
91 <HR>
92
93 <!-- ####################################################### -->
94
95 <H1><A NAME="1_0">1.0 General Information</A></H1>
96 <!-- I suspect these will mostly be links to/into existing documents. -->
97    <H2><A NAME="1_1">1.1 What is libstdc++-v3?</A></H2>
98       <P>The GNU Standard C++ Library v3, or libstdc++-2.9x, is an 
99          ongoing project to implement the ISO 14882 Standard C++ library 
100          as described in chapters 17 through 27 and annex D.  As the 
101          library reaches stable plateaus, it is captured in a snapshot
102          and released.  The current release is <A
103 HREF="ftp://gcc.gnu.org/pub/libstdc++/libstdc++-2.92.tar.gz">the
104          eleventh snapshot</A>.  For those who want to see exactly how
105          far the project has come, or just want the latest
106          bleeding-edge code, the up-to-date source is available over
107          anonymous CVS, and can even be browsed over the Web (see below). 
108       </P> 
109       <P>A more formal description of the V3 goals can be found in the
110          official <A HREF="../17_intro/DESIGN">design document</A>. 
111       </P> 
112
113 <HR>
114    <H2><A NAME="1_2">1.2 Why should I use libstdc++?</A></H2>
115       <P>The completion of the ISO C++ standardization gave the
116          C++ community a powerful set of reuseable tools in the form
117          of the C++ Standard Library.  However, all existing C++
118          implementations are (as the Draft Standard used to say)
119          &quot;incomplet and incorrekt,&quot; and many suffer from
120          limitations of the compilers that use them.
121       </P> 
122       <P>The GNU C/C++/FORTRAN/&lt;pick-a-language&gt; compiler
123          (<TT>gcc</TT>, <TT>g++</TT>, etc) is widely considered to be
124          one of the leading compilers in the world.  Its development
125          has recently been taken over by the 
126          <A HREF="http://gcc.gnu.org/">GCC team</A>.  All of
127          the rapid development and near-legendary
128      <A
129 HREF="http://gcc.gnu.org/gcc-2.95/buildstat.html">portability</A>
130          that are the hallmarks of an open-source project are being
131          applied to libstdc++.
132       </P>
133       <P>That means that all of the Standard classes and functions
134          (such as <TT>string</TT>, <TT>vector&lt;&gt;</TT>, iostreams,
135          and algorithms) will be freely available and fully compliant.
136          Programmers will no longer need to &quot;roll their own&quot;
137          nor be worried about platform-specific incompatabilities.
138       </P>
139
140 <HR>
141    <H2><A NAME="1_3">1.3 Who's in charge of it?</A></H2>
142       <P>The libstdc++ project is contributed to by several developers
143          all over the world, in the same way as GCC or Linux.
144          Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, and Ulrich
145          Drepper are the lead maintainers of the CVS archive.
146       </P>
147       <P>Development and discussion is held on the libstdc++ mailing
148          list.  Subscribing to the list, or searching the list
149          archives, is open to everyone.  You can read instructions for
150          doing so on the <A HREF="http://gcc.gnu.org/libstdc++/">homepage</A>.
151          If you have questions, ideas, code, or are just curious, sign up!
152       </P>
153
154 <HR>
155    <H2><A NAME="1_4">1.4 How do I get libstdc++?</A></H2>
156       <P>The eleventh (and latest) snapshot of libstdc++-v3 is <A
157 HREF="ftp://gcc.gnu.org/pub/libstdc++/libstdc++-2.92.tar.gz">
158          available via ftp</A>.
159       </P>
160       <P>The <A HREF="http://gcc.gnu.org/libstdc++/">homepage</A>
161          has instructions for retrieving the latest CVS sources, and for
162          browsing the CVS sources over the web.
163       </P>
164       <P>The subset commonly known as the Standard Template Library
165          (chapters 23 through 25, mostly) is adapted from the SGI STL,
166          which is also an ongoing work.<!-- Possibly a link to SGI's
167          STL here. -->
168       </P> 
169
170 <HR>
171    <H2><A NAME="1_5">1.5 When is libstdc++ going to be finished?</A></H2>
172 <!--      <P>Nathan Myers gave the best of all possible answers in <A 
173          HREF="http://www.deja.com/getdoc.xp?AN=469581698&fmt=text">a 
174          Usenet article</A>.</P>
175 which is no longer available, thanks deja...-->
176       <P>Nathan Myers gave the best of all possible answers, responding to a
177          Usenet article asking this question:  <EM>Sooner, if you help.</EM>
178       </P>
179
180
181 <HR>
182    <H2><A NAME="1_6">1.6 How do I contribute to the effort?</A></H2>
183       <P>Here is <A HREF="../17_intro/contribute.html">a
184          page devoted to this topic</A>.  Subscribing to the mailing
185          list (see above, or the homepage) is a very good idea if you
186          have something to contribute, or if you have spare time and
187          want to help.  Contributions don't have to be in the form of
188          source code; anybody who is willing to help write
189          documentation, for example, or has found a bug in code that
190          we all thought was working, is more than welcome!
191       </P> 
192
193 <HR>
194    <H2><A NAME="1_7">1.7 What happened to libg++?  I need that!</A></H2>
195       <P>The most recent libg++ README states that libg++ is no longer
196          being actively maintained.  It should not be used for new
197          projects, and is only being kicked along to support older code.
198       </P>
199       <P>The libg++ was designed and created when there was no Standard
200          to provide guidance.  Classes like linked lists are now provided
201          for by <TT>list&lt;T&gt;</TT> and do not need to be created by
202          <TT>genclass</TT>.  (For that matter, templates exist now and
203          are well-supported, whereas genclass (mostly) predates them.)
204       </P>
205       <P>There are other classes in libg++ that are not specified in the
206          ISO Standard (e.g., statistical analysis).  While there are a
207          lot of really useful things that are used by a lot of people
208          (e.g., statistics :-), the Standards Committee couldn't include
209          everything, and so a lot of those &quot;obvious&quot; classes
210          didn't get included.
211       </P>
212       <P>Since libstdc++ is an implementation of the Standard Library, we
213          have no plans at this time to include non-Standard utilities
214          in the implementation, however handy they are.  (The extensions
215          provided in the SGI STL aren't maintained by us and don't get
216          a lot of our attention, because they don't require a lot of our
217          time.)  It is entirely plausable that the &quot;useful stuff&quot;
218          from libg++ might be extracted into an updated utilities library,
219          but nobody has stated such a project yet.
220       </P>
221       <!-- The advertisement, so to speak, might have to go.  Hmmmmm.  -->
222       <P>(The <A HREF="http://www.boost.org/">Boost</A> site houses free
223          C++ libraries that do varying things, and happened to be started
224          by members of the Standards Committee.  Certain &quot;useful
225          stuff&quot; classes will probably migrate there.)
226       </P>
227       <P>For the bold and/or desperate, the
228          <A HREF="http://gcc.gnu.org/fom_serv/cache/33.html">GCC FAQ</A>
229          describes where to find the last libg++ source.
230       </P>
231
232 <HR>
233    <H2><A NAME="1_8">1.8 What if I have more questions?</A></H2>
234       <P>If you have read the README and RELEASE-NOTES files, and your
235          question remains unanswered, then just ask the mailing list.
236          At present, you do not need to be subscribed to the list to
237          send a message to it.  More information is available on the
238          homepage (including how to browse the list archives); to send
239          to the list, use <A HREF="mailto:libstdc++@gcc.gnu.org">
240          <CODE>libstdc++@gcc.gnu.org</CODE></A>.
241       </P>
242       <P>If you have a question that you think should be included here,
243          or if you have a question <EM>about</EM> a question/answer here,
244          contact <A HREF="mailto:pme@gcc.gnu.org">Phil Edwards</A>
245          or <A HREF="mailto:gdr@gcc.gnu.org">Gabriel Dos Reis</A>.
246       </P>
247
248 <HR>
249
250 <H1><A NAME="2_0">2.0 Installation</A></H1>
251    <H2><A NAME="2_1">2.1 How do I install libstdc++-v3?</A></H2>
252       <P>Complete instructions are not given here (this is a FAQ, not
253          an installation document), but the tools required are few:
254       </P>
255          <UL>
256             <LI> A 3.x release of GCC.  Note that building GCC is much
257                  easier and more automated than building the GCC 2.[78]
258                  series was.  If you are using GCC 2.95, you can still
259                  build earlier snapshots of libstdc++.
260             <LI> GNU Make is recommended, but should not be required.
261             <LI> The GNU Autotools are needed if you are messing with
262                  the configury or makefiles.
263          </UL>
264       <P>The file <A HREF="../documentation.html">documentation.html</A>
265          provides a good overview of the steps necessary to build, install,
266          and use the library.  Instructions for configuring the library
267          with new flags such as --enable-threads are there also, as well as
268          patches and instructions for working with GCC 2.95.
269       </P>
270       <P>The top-level install.html and
271          <A HREF="../17_intro/RELEASE-NOTES">RELEASE-NOTES</A> files contain
272          the exact build and installation instructions.  You may wish to
273          browse those files over CVSweb ahead of time to get a feel for
274          what's required.  RELEASE-NOTES is located in the
275          &quot;.../docs/17_intro/&quot; directory of the distribution.
276       </P> 
277
278 <HR>
279    <H2><A NAME="2_2">2.2 [removed]</A></H2>
280       <P>This question has become moot and has been removed.  The stub
281          is here to preserve numbering (and hence links/bookmarks).
282       </P>
283
284 <HR>
285    <H2><A NAME="2_3">2.3 What is this CVS thing that you
286                          keep mentioning?</A></H2>
287       <P>The <EM>Concurrent Versions System</EM> is one of several revision
288          control packages.  It was selected for GNU projects because it's
289          free (speech), free (beer), and very high quality.  The <A
290          HREF="http://www.gnu.org/software/cvs/cvs.html">CVS entry in
291          the GNU software catalogue</A> has a better description as 
292          well as a
293          <A HREF="http://www.cvshome.org/">link to the makers of CVS</A>. 
294       </P>
295       <P>The &quot;anonymous client checkout&quot; feature of CVS is
296          similar to anonymous FTP in that it allows anyone to retrieve
297          the latest libstdc++ sources.
298       </P>
299       <P>After the first of April, American users will have a
300          &quot;/pharmacy&quot; command-line option...
301          <!-- wonder how long that'll live -->
302       </P>
303
304 <HR>
305    <H2><A NAME="2_4">2.4 How do I know if it works?</A></H2>
306       <P>libstdc++-v3 comes with its own testsuite.  You do not need
307          to actually install the library (&quot;<TT>make
308          install</TT>&quot;) to run the testsuite.
309       </P>
310       <P>To run the testsuite on the library after building it, use
311          &quot;make check&quot; while in your build directory.  To run
312          the testsuite on the library after building and installing it,
313          use &quot;make check-install&quot; instead.
314       </P>
315       <P>If you find bugs in the testsuite programs themselves, or if
316          you think of a new test program that should be added to the
317          suite, <B>please</B> write up your idea and send it to the list!
318       </P>
319
320 <HR>
321 <H1><A NAME="3_0">3.0 Platform-Specific Issues</A></H1>
322    <H2><A NAME="3_1">3.1 Can libstdc++-v3 be used with &lt;my
323                          favorite compiler&gt;?</A></H2>
324       <P>Probably not.  Yet.</P>
325       <P>Because GCC advances so rapidly, development and testing of
326          libstdc++ is being done almost entirely under that compiler.
327          If you are curious about whether other, lesser compilers
328          (*grin*) support libstdc++, you are more than welcome to try.
329          Configuring and building the library (see above) will still
330          require certain tools, however.  Also keep in mind that
331          <EM>building</EM> libstdc++ does not imply that your compiler
332          will be able to <EM>use</EM> all of the features found in the
333          C++ Standard Library.
334       </P>
335       <P>Since the goal of ISO Standardization is for all C++
336          implementations to be able to share code, the final libstdc++
337          should, in theory, be useable under any ISO-compliant
338          compiler.  It will still be targeted and optimized for
339          GCC/g++, however.
340       </P> 
341
342 <HR>
343    <H2><A NAME="3_2">3.2 [removed]</A></H2>
344       <P>This question has become moot and has been removed.  The stub
345          is here to preserve numbering (and hence links/bookmarks).
346       </P>
347
348 <HR>
349    <H2><A NAME="3_3">3.3 Building DEC OSF kills the assembler</A></H2>
350       <P>The <TT>atomicity.h</TT> header for the Alpha processor
351          currently uses pseudo-operators which the DEC assembler
352          doesn't understand (in particular, .subsection and .previous).
353          The simple solution is to install GNU <TT>as</TT> and arrange
354          for the GCC build to use it (or merge the sources and build
355          it during the bootstrap).
356       </P>
357       <P>Anyone who
358          <A HREF="http://gcc.gnu.org/ml/libstdc++/2000-12/msg00279.html">knows
359          the DEC assembler well enough</A> to provide the equivalent of
360          these two pseudos would win praise and accolades from many.
361       </P>
362
363
364 <HR>
365 <H1><A NAME="4_0">4.0 Known Bugs and Non-Bugs</A></H1>
366    <EM>Note that this section can get rapdily outdated -- such is the
367    nature of an open-source project.  For the latest information, join
368    the mailing list or look through recent archives.   The RELEASE-
369    NOTES and BUGS files are generally kept up-to-date.</EM> 
370
371    <H2><A NAME="4_1">4.1 What works already?</A></H2>
372       <P>This is a verbatim clip from the &quot;Status&quot; section
373           of the RELEASE-NOTES for the latest snapshot.
374       </P> 
375
376 <!-- Yeah, I meant that "verbatim clip" thing literally... :-)  -->
377
378 <pre>
379 New:
380 ---
381 - preliminary doxygen documentation has been added. Running &quot;make
382   doxygen&quot; in the libstdc++-v3 build directory will generate HTML
383   documentation that can be used to cross-reference names and files in
384   the library.
385 - a dejagnu based testing framework has been added
386 - a new implementation of the concept checking code has been ported
387   from the boost libraries.
388 - support for -fno-exceptions has been added
389 - stdexcept was re-written
390 - using deprecated or antiquated headers now gives a warning
391 - the stdio interface to iostreams has been tweaked, and now works
392   with synchronized c/c++ io
393 - new libsupc++ routines implementing the IA-64 C++ ABI.
394 - HPUX configuration files
395 - support for AIX added
396 - a lot of bugs were fixed.
397 - preliminary named locales implemented
398 - portability improvements made to generation of &lt;limits&gt;
399 - speedups to improve configuration time.
400 - DJGPP support added.
401 - support for dlopening shared libstdc++
402 </pre>
403
404
405 <HR>
406    <H2><A NAME="4_2">4.2 Bugs in gcc/g++ (not libstdc++-v3)</A></H2>
407       <P>This is by no means meant to be complete nor exhaustive, but
408          mentions some problems that users may encounter when building
409          or using libstdc++.  If you are experiencing one of these
410          problems, you can find more information on the libstdc++ and
411          the GCC mailing lists.
412       </P>
413       <UL>
414          <LI>As of 2.91, these bugs have all been fixed.  We look forward
415              to new ones, well, not exactly...
416       </UL>
417
418 <HR>
419    <H2><A NAME="4_3">4.3 Bugs in the C++ language/lib specification</A></H2>
420       <P>Yes, unfortunately, there are some.  In a <A 
421 HREF="http://gcc.gnu.org/ml/libstdc++/1998/msg00006.html">message
422 to the list</A>, Nathan Myers announced that he has started a list of
423          problems in the ISO C++ Standard itself, especially with
424          regard to the chapters that concern the library.  The list
425          itself is <A
426          HREF="http://www.cantrip.org/draft-bugs.txt">posted on his
427          website</A>.  Developers who are having problems interpreting
428          the Standard may wish to consult his notes.
429       </P>
430       <P>For those people who are not part of the ISO Library Group
431          (i.e., nearly all of us needing to read this page in the first
432          place :-), a public list of the library defects is occasionally
433          published <A HREF="http://anubis.dkuug.dk/jtc1/sc22/wg21/">here</A>.
434       </P>
435
436 <HR>
437    <H2><A NAME="4_4">4.4 Things in libstdc++ that look like bugs</A></H2>
438       <P>There are things which are not bugs in the compiler (4.2) nor
439          the language specification (4.3), but aren't really bugs in
440          libstdc++, either.  Really!  Please do not report these as bugs.
441       </P>
442       <A NAME="4_4_Weff">
443         <P><STRONG>-Weffc++</STRONG>
444            The biggest of these is the quadzillions of warnings about the
445            library headers emitted when <TT>-Weffc++</TT> is used.  Making
446            libstdc++ &quot;-Weffc++-clean&quot; is not a goal of the project,
447            for a few reasons.  Mainly, that option tries to enforce
448            object-oriented programming, while the Standard Library isn't
449            necessarily trying to be OO.  There are multiple solutions
450            under discussion.
451         </P>
452       </A>
453       <A NAME="4_4_rel_ops">
454         <P><STRONG>rel_ops</STRONG>
455            Another is the <TT>rel_ops</TT> namespace and the template
456            comparison operator functions contained therein.  If they become
457            visible in the same namespace as other comparison functions
458            (e.g., '<TT>using</TT>' them and the &lt;iterator&gt; header),
459            then you will suddenly be faced with huge numbers of ambiguity
460            errors.  This was discussed on the -v3 list; Nathan Myers
461            <A HREF="http://gcc.gnu.org/ml/libstdc++/2001-01/msg00247.html">sums
462            things up here</A>.
463         </P>
464       </A>
465       <A NAME="4_4_interface"><H3>The g++-3 headers are
466                                       <EM>not ours</EM></H3>
467         <P>If you have found an extremely broken header file which is
468            causing problems for you, look carefully before submitting a
469            &quot;high&quot; priority bug report (which you probably shouldn't
470            do anyhow; see the last paragraph of the page describing
471          <A HREF="http://gcc.gnu.org/gnatswrite.html">the GCC bug database</A>).
472         </P>
473         <P>If the headers are in <CODE>${prefix}/include/g++-3</CODE>, then
474            you are using the old libstdc++-v2 library, which is nonstandard
475            and unmaintained.  Do not report problems with -v2 to the -v3
476            mailing list.
477         </P>
478         <P>Currently our header files are installed in
479            <CODE>${prefix}/include/g++-v3</CODE> (see the 'v'?).  This may
480            change with the next release of GCC, as it may be too confusing,
481            but <A HREF="http://gcc.gnu.org/ml/gcc/2000-10/msg00732.html">the
482            question has not yet been decided</A>.
483         </P>
484       </A>
485       <A NAME="4_4_glibc">
486         <P><STRONG>glibc</STRONG>
487            If you're on a GNU/Linux system and have just upgraded to
488            glibc 2.2, but are still using gcc 2.95.2, then you should have
489            read the glibc FAQ, specifically 2.34:
490    <PRE>
491 2.34.   When compiling C++ programs, I get a compilation error in streambuf.h.
492
493 {BH} You are using g++ 2.95.2? After upgrading to glibc 2.2, you need to
494 apply a patch to the include files in /usr/include/g++, because the fpos_t
495 type has changed in glibc 2.2.  The patch is at
496 http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
497    </PRE>
498            Note that 2.95.x shipped with the
499            <A HREF="#4_4_interface">old v2 library</A> which is no longer
500            maintained.  Also note that gcc 2.95.3 fixes this problem, but
501            requires a separate patch for libstdc++-v3.
502         </P>
503       </A>
504       <A NAME="4_4_checks">
505         <P><STRONG>concept checks</STRONG>
506            If you see compilation errors containing messages about
507            <TT> <EM>foo</EM>Concept </TT>and a<TT> constraints </TT>
508            member function, then most likely you have violated one of the
509            requirements for types used during instantiation of template
510            containers and functions.  For example, EqualityComparableConcept
511            appears if your types must be comparable with == and you have not
512            provided this capability (a typo, or wrong visibility, or you
513            just plain forgot, etc).
514         </P>
515         <P>More information, including how to optionally enable/disable the
516            checks, is available
517            <A HREF="../19_diagnostics/howto.html#3">here</A>.
518         </P>
519       </A>
520
521 <HR>
522    <H2><A NAME="4_5">4.5 Aw, that's easy to fix!</A></H2>
523       <P>If you have found a bug in the library and you think you have
524          a working fix, then send it in!  The main GCC site has a page
525          on <A HREF="http://gcc.gnu.org/contribute.html">submitting
526          patches</A> that covers the procedure, but for libstdc++ you
527          should also send the patch to our mailing list in addition to
528          the GCC patches mailing list.  The libstdc++
529          <A HREF="../17_intro/contribute.html">contributors' page</A>
530          also talks about how to submit patches.
531       </P>
532       <P>In addition to the description, the patch, and the ChangeLog
533          entry, it is a Good Thing if you can additionally create a small
534          test program to test for the presence of the bug that your
535          patch fixes.  Bugs have a way of being reintroduced; if an old
536          bug creeps back in, it will be caught immediately by the 
537          <A HREF="#2_4">testsuite</A> -- but only if such a test exists.
538       </P>
539
540 <HR>
541 <H1><A NAME="5_0">5.0 Miscellaneous</A></H1>
542    <H2><A NAME="5_1">5.1 string::iterator is not char*;
543                      vector&lt;T&gt;::iterator is not T*</A></H2>
544       <P>If you have code that depends on container&lt;T&gt; iterators
545          being implemented as pointer-to-T, your code is broken.
546       </P>
547       <P>While there are arguments for iterators to be implemented in
548          that manner, A) they aren't very good ones in the long term,
549          and B) they were never guaranteed by the Standard anyway.  The
550          type-safety achieved by making iterators a real class rather
551          than a typedef for <TT>T*</TT> outweighs nearly all opposing
552          arguments.
553       </P>
554       <P>Code which does assume that a vector iterator <code> i </code>
555          is a pointer can often be fixed by changing <code> i </code> in
556          certain expressions to <code> &amp;*i </code>.  Future revisions
557          of the Standard are expected to bless this usage for
558          vector&lt;&gt; (but not for basic_string&lt;&gt;).
559       </P>
560
561 <HR>
562    <H2><A NAME="5_2">5.2 What's next after libstdc++-v3?</A></H2>
563       <P>Hopefully, not much.  The goal of libstdc++-v3 is to produce
564          a fully-compliant, fully-portable Standard Library.  After that,
565          we're mostly done:  there won't <EM>be</EM> any more compliance
566          work to do.  However:
567       </P>
568       <OL>
569       <LI><P>The ISO Committee will meet periodically to review Defect Reports
570          in the C++ Standard.  Undoubtedly some of these will result in
571          changes to the Standard, which will be reflected in patches to
572          libstdc++.  Some of that is already happening, see 4.2.  Some of
573          those changes are being predicted by the library maintainers, and
574          we add code to the library based on what the current proposed
575          resolution specifies.
576       </P>
577       <LI><P>Performance tuning.  Lots of performance tuning.  This too is
578          already underway for post-3.0 releases, starting with memory
579          expansion in container classes and buffer usage in synchronized
580          stream objects.
581       </P>
582       <LI><P>An ABI for libstdc++ will eventually be developed, so that
583          multiple binary-incompatible copies of the library can be replaced
584          with a single backwards-compatible library, like libgcc_s.so is.
585       </P>
586       <LI><P>The current libstdc++ contains extensions to the Library which
587          must be explicitly requested by client code (for example, the
588          hash tables from SGI).  Other extensions may be added to
589          libstdc++-v3 if they seem to be &quot;standard&quot; enough.
590          (For example, the &quot;long long&quot; type from C99.)
591          Bugfixes and rewrites (to improve or fix thread safety, for
592          instance) will of course be a continuing task.
593       </P>
594       </OL>
595       <P><A
596 HREF="http://gcc.gnu.org/ml/libstdc++/1999/msg00080.html">This
597          question</A> about the next libstdc++ prompted some brief but
598          interesting <A
599 HREF="http://gcc.gnu.org/ml/libstdc++/1999/msg00084.html">speculation</A>.
600       </P>
601
602 <HR>
603    <H2><A NAME="5_3">5.3 What about the STL from SGI?</A></H2>
604       <P>The <A HREF="http://www.sgi.com/Technology/STL/">STL from SGI</A>,
605          version 3.3, was the most recent merge of the STL codebase.  The
606          code in libstdc++ contains many fixes and changes, and it is
607          very likely that the SGI code is no longer under active
608          development.  We expect that no future merges will take place.
609       </P>
610       <P>In particular, <TT>string</TT> is not from SGI and makes no
611          use of their &quot;rope&quot; class (which is included as an
612          optional extension), nor is <TT>valarray</TT> and some others.
613          Classes like <TT>vector&lt;&gt;</TT> are, however.
614       </P>
615       <P>The FAQ for SGI's STL (one jump off of their main page) is
616          recommended reading.
617       </P>
618
619 <HR>
620    <H2><A NAME="5_4">5.4 Extensions and Backward Compatibility</A></H2>
621       <P>Although you can specify <TT>-I</TT> options to make the
622          preprocessor search the g++-v3/ext and /backward directories,
623          it is better to refer to files there by their path, as in:
624          <!-- Careful, the leading spaces in PRE show up directly. -->
625       </P>
626          <PRE>
627        #include &lt;ext/hash_map&gt;
628          </PRE>
629       <P>Extensions to the library have
630          <A HREF="../ext/howto.html">their own page</A>.
631       </P>
632
633 <HR>
634    <H2><A NAME="5_5">5.5 [removed]</A></H2>
635       <P>This question has become moot and has been removed.  The stub
636          is here to preserve numbering (and hence links/bookmarks).
637       </P>
638
639 <HR>
640    <H2><A NAME="5_6">5.6 Is libstdc++-v3 thread-safe?</A></H2>
641       <P>Quick answer:  no, as of 2.92 (eleventh snapshot), the
642          library is not appropriate for multithreaded access.  The
643          string class is MT-safe.
644       </P>
645       <P>This is assuming that your idea of &quot;multithreaded&quot;
646          is the same as ours...  The general question of multithreading
647          and libstdc++-v3 is addressed in the chapter-specific advice for
648 <A HREF="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/howto.html#3">Library
649          Introduction</A>.  Threadsafe containers are covered in
650          more detail in
651 <A HREF="http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html">the
652          Received Wisdom section on containers</A>.
653          <!-- I have successfully evaded the topic; my work here is
654               done- no, wait, I have to write those other sections... -->
655       </P>
656
657 <HR>
658    <H2><A NAME="5_7">5.7 How do I get a copy of the ISO C++ Standard?</A></H2>
659       <P>Copies of the full ISO 14882 standard are available on line via the
660          ISO mirror site for committee members.  Non-members, or those who
661          have not paid for the privilege of sitting on the committee and
662          sustained their two-meeting commitment for voting rights, may get a
663          copy of the standard from their respective national standards
664          organization.  In the USA, this national standards organization is
665          ANSI and their website is right <A HREF="http://www.ansi.org">here</A>.
666          (And if you've already registered with them, clicking this link will
667          take you to directly to the place where you can
668 <A HREF="http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998">buy
669          the standard on-line</A>.
670       </P>
671       <P>Who is your country's member body?  Visit the
672          <A HREF="http://www.iso.ch/">ISO homepage</A> and find out!
673       </P>
674
675 <!-- ####################################################### -->
676
677 <HR>
678 <P CLASS="fineprint"><EM>
679 Comments and suggestions are welcome, and may be sent to
680 <A HREF="mailto:libstdc++@gcc.gnu.org">the mailing list</A>.
681 <BR> $Id: index.html,v 1.9 2001/05/30 21:55:04 pme Exp $
682 </EM></P>
683
684
685 </BODY>
686 </HTML>
687