diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index f9542ec1daa..8a36129feae 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2012-08-28 Benjamin Kosnik Copyright ©
+
+
+
The GNU C++ library sources have been specially formatted so that
with the proper invocation of another tool (Doxygen), a set of
indexed reference material can generated from the sources files
@@ -60,4 +56,4 @@
In addition, a rendered set of man pages are available in the same
location specified above. Start with C++Intro(3).
- Table of Contents Table of Contents Table of Contents Table of Contents 1.1.
+ 1.1.
What is libstdc++?
-
+
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. For those who want to see
@@ -119,9 +115,9 @@
bleeding-edge code, the up-to-date source is available over
anonymous SVN, and can even be browsed over
the web.
- 1.2.
+ 1.2.
Why should I use libstdc++?
-
+
The completion of the ISO C++ standardization gave the C++
community a powerful set of reuseable tools in the form of the C++
Standard Library. However, all existing C++ implementations are
@@ -145,9 +141,9 @@
1.3.
+ 1.3.
Who's in charge of it?
-
+
The libstdc++ project is contributed to by several developers
all over the world, in the same way as GCC or the Linux kernel.
Benjamin Kosnik, Gabriel Dos Reis, Phil Edwards, Ulrich Drepper,
@@ -159,15 +155,15 @@
archives, is open to everyone. You can read instructions for
doing so on the homepage.
If you have questions, ideas, code, or are just curious, sign up!
- 1.4.
+ 1.4.
When is libstdc++ going to be finished?
-
+
Nathan Myers gave the best of all possible answers, responding to
a Usenet article asking this question: Sooner, if you
help.
- 1.5.
+ 1.5.
How do I contribute to the effort?
-
+
Here is a page devoted to
this topic. Subscribing to the mailing list (see above, or
the homepage) is a very good idea if you have something to
@@ -176,17 +172,17 @@
anybody who is willing to help write documentation, for example,
or has found a bug in code that we all thought was working and is
willing to provide details, is more than welcome!
- 1.6.
+ 1.6.
What happened to the older libg++? I need that!
-
+
The most recent libg++ README states that libg++ is no longer
being actively maintained. It should not be used for new
projects, and is only being kicked along to support older code.
More information in the backwards compatibility documentation
- 1.7.
+ 1.7.
What if I have more questions?
-
+
If you have read the README file, and your question remains
unanswered, then just ask the mailing list. At present, you do not
need to be subscribed to the list to send a message to it. More
@@ -205,19 +201,19 @@
How is that different from the GNU {Lesser,Library} GPL?
2.1.
+ 2.1.
What are the license terms for libstdc++?
-
+
See our license description
for these and related questions.
- 2.2.
+ 2.2.
So any program which uses libstdc++ falls under the GPL?
-
+
No. The special exception permits use of the library in
proprietary applications.
- 2.3.
+ 2.3.
How is that different from the GNU {Lesser,Library} GPL?
-
+
The LGPL requires that users be able to replace the LGPL code with a
modified version; this is trivial if the library in question is a C
shared library. But there's no way to make that work with C++, where
@@ -225,9 +221,9 @@
are expanded inside the code that uses the library. So to allow people
to replace the library code, someone using the library would have to
distribute their own source, rendering the LGPL equivalent to the GPL.
- 2.4.
+ 2.4.
I see. So, what restrictions are there on programs that use the library?
-
+
None. We encourage such programs to be released as open source,
but we won't punish you or sue you if you choose otherwise.
3.1. How do I install libstdc++?
-
+ 3.1. How do I install libstdc++?
+
Often libstdc++ comes pre-installed as an integral part of many
existing GNU/Linux and Unix systems, as well as many embedded
development tools. It may be necessary to install extra
@@ -251,8 +247,8 @@
documentation for detailed
instructions. You may wish to browse those files ahead
of time to get a feel for what's required.
- 3.2. How does one get current libstdc++ sources?
-
+ 3.2. How does one get current libstdc++ sources?
+
Libstdc++ sources for all official releases can be obtained as
part of the GCC sources, available from various sites and
mirrors. A full list of
@@ -276,8 +272,8 @@
For more information
see SVN
details.
- 3.3. How do I know if it works?
-
+ 3.3. How do I know if it works?
+
Libstdc++ comes with its own validation testsuite, which includes
conformance testing, regression testing, ABI testing, and
performance testing. Please consult the
@@ -287,8 +283,8 @@
If you find bugs in the testsuite programs themselves, or if you
think of a new test program that should be added to the suite,
please write up your idea and send it to the list!
- 3.4. How do I insure that the dynamically linked library will be found?
-
+ 3.4. How do I insure that the dynamically linked library will be found?
+
Depending on your platform and library version, the error message might
be similar to one of the following:
Using LD_LIBRARY_PATH is not always the best solution, Finding Dynamic or Shared
Libraries in the manual gives some alternatives.
- 3.5.
+ 3.5.
What's libsupc++?
-
+
If the only functions from 3.6.
+ 3.6.
This library is HUGE!
-
+
Usually the size of libraries on disk isn't noticeable. When a
link editor (or simply “linker”) pulls things from a
static archive library, only the necessary object files are copied
@@ -385,9 +381,9 @@
Recent GNU/Linux glibc required?
4.1.
+ 4.1.
Can libstdc++ be used with non-GNU compilers?
-
+
Perhaps.
Since the goal of ISO Standardization is for all C++
@@ -405,9 +401,9 @@
been known to work with versions of the EDG C++ compiler, and
vendor-specific proprietary C++ compilers such as the Intel ICC
C++ compiler.
- 4.2.
+ 4.2.
No 'long long' type on Solaris?
-
+
By default we try to support the C99 long long type.
This requires that certain functions from your C library be present.
@@ -417,9 +413,9 @@
commonly reported platform affected was Solaris.
This has been fixed for libstdc++ releases greater than 3.0.3.
- 4.3.
+ 4.3.
On Solaris, g++ (but not gcc) always defines the preprocessor
+ On Solaris, g++ (but not gcc) always defines the preprocessor
macro This method is something of a wart. We'd like to find a cleaner
solution, but nobody yet has contributed the time.
- 4.4.
+ 4.4.
Mac OS X This is a long-standing bug in the OS X support. Fortunately,
+ This is a long-standing bug in the OS X support. Fortunately,
the patch is quite simple, and well-known.
Here's a
link to the solution.
- 4.5.
+ 4.5.
Threading is broken on i386?
-
+
Support for atomic integer operations is/was broken on i386
platforms. The assembly code accidentally used opcodes that are
only available on the i486 and later. So if you configured GCC
@@ -462,9 +458,9 @@
on an i686, then you would encounter no problems. Only when
actually running the code on a i386 will the problem appear.
This is fixed in 3.2.2.
- 4.6.
+ 4.6.
MIPS atomic operations
-
+
The atomic locking routines for MIPS targets requires MIPS II
and later. A patch went in just after the 3.3 release to
make mips* use the generic implementation instead. You can also
@@ -472,9 +468,9 @@
The mips*-*-linux* port continues to use the MIPS II routines, and more
work in this area is expected.
- 4.7.
+ 4.7.
Recent GNU/Linux glibc required?
- When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
+ When running on GNU/Linux, libstdc++ 3.2.1 (shared library version
5.0.1) and later uses localization and formatting code from the system
C library (glibc) version 2.2.5 which contains necessary bugfixes.
Most GNU/Linux distros make more recent versions available now.
@@ -483,9 +479,9 @@
The guideline is simple: the more recent the C++ library, the
more recent the C library. (This is also documented in the main
GCC installation instructions.)
- 4.8.
+ 4.8.
Can't use wchar_t/wstring on FreeBSD
-
+
Older versions of FreeBSD's C library do not have sufficient
support for wide character functions, and as a result the
libstdc++ configury decides that wchar_t support should be
@@ -502,9 +498,9 @@
Bugs in the ISO C++ language or library specification
5.1.
+ 5.1.
What works already?
-
+
Short answer: Pretty much everything works
except for some corner cases. Support for localization
in 5.2.
+ 5.2.
Bugs in the ISO C++ language or library specification
-
+
Unfortunately, there are some.
For those people who are not part of the ISO Library Group
@@ -531,9 +527,9 @@
If you think you've discovered a new bug that is not listed,
please post a message describing your problem to the author of
the library issues list or the Usenet group comp.lang.c++.moderated.
- 5.3.
+ 5.3.
Bugs in the compiler (gcc/g++) and not libstdc++
-
+
On occasion, the compiler is wrong. Please be advised that this
happens much less often than one would think, and avoid jumping to
conclusions.
@@ -566,19 +562,19 @@
list::size() is O(n)!
6.1.
+ 6.1.
Reopening a stream fails
-
+
One of the most-reported non-bug reports. Executing a sequence like:
-
All operations on the re-opened 6.2.
+ 6.2.
-Weffc++ complains too much
-
+
Many warnings are emitted when 6.3.
+ 6.3.
Ambiguous overloads after including an old-style header
-
+
Another problem is the 6.4.
+ 6.4.
The g++-3 headers are not ours
-
+
If you are using headers in
6.5.
+ 6.5.
Errors about *Concept and
constraints in the STL
-
+
If you see compilation errors containing messages about
foo Concept and something to do with a
constraints member function, then most
@@ -650,28 +646,28 @@
checks, is available in the
Diagnostics.
chapter of the manual.
- 6.6.
+ 6.6.
Program crashes when using library code in a
dynamically-loaded library
-
+
If you are using the C++ library across dynamically-loaded
objects, make certain that you are passing the correct options
when compiling and linking:
- 6.7.
+ 6.7.
“Memory leaks” in containers
-
+
A few people have reported that the standard containers appear
to leak memory when tested with memory checkers such as
valgrind.
@@ -682,15 +678,15 @@
want to test the library for memory leaks please read
Tips for memory leak hunting
first.
- 6.8.
+ 6.8.
list::size() is O(n)!
-
+
See
the Containers
chapter.
- 6.9.
+ 6.9.
Aw, that's easy to fix!
-
+
If you have found a bug in the library and you think you have
a working fix, then send it in! The main GCC site has a page
on submitting
@@ -721,9 +717,9 @@
What's an ABI and why is it so messy?
7.1.
+ 7.1.
string::iterator is not char*; vector<T>::iterator is not T*
-
+
If you have code that depends on container<T> iterators
being implemented as pointer-to-T, your code is broken. It's
considered a feature, not a bug, that libstdc++ points this out.
@@ -740,9 +736,9 @@
certain expressions to 7.2.
+ 7.2.
What's next after libstdc++?
-
+
Hopefully, not much. The goal of libstdc++ is to produce a
fully-compliant, fully-portable Standard Library. After that,
we're mostly done: there won't be any
@@ -753,9 +749,9 @@
this effort is described in
The C++ Library Technical Report 1.
- 7.3.
+ 7.3.
What about the STL from SGI?
-
+
The STL from SGI,
version 3.3, was the final merge of the STL codebase. The
code in libstdc++ contains many fixes and changes, and
@@ -776,13 +772,13 @@
The FAQ for SGI's STL (one jump off of their main page) is
still recommended reading.
- 7.4.
+ 7.4.
Extensions and Backward Compatibility
-
+
See the link on backwards compatibility and link on evolution.
- 7.5.
+ 7.5.
Does libstdc++ support TR1?
-
+
Yes.
The C++ Standard Library Technical Report adds many new features to
@@ -792,8 +788,8 @@
The implementation status of TR1 in libstdc++ can be tracked on the TR1 status
page.
- 7.6. How do I get a copy of the ISO C++ Standard?
-
+ 7.6. How do I get a copy of the ISO C++ Standard?
+
Copies of the full ISO 14882 standard are available on line via
the ISO mirror site for committee members. Non-members, or those
who have not paid for the privilege of sitting on the committee
@@ -811,9 +807,9 @@
The 2003 version of the standard (the 1998 version plus TC1) is
available in print, ISBN 0-470-84674-7.
- 7.7.
+ 7.7.
What's an ABI and why is it so messy?
-
+
ABI stands for “Application Binary
Interface”. Conventionally, it refers to a great
mass of details about how arguments are arranged on the call
@@ -859,17 +855,17 @@
so they may later be changed. Deciding which, and implementing
the decisions, must happen before you can reasonably document a
candidate C++ ABI that encompasses the standard library.
- 7.8.
+ 7.8.
How do I make std::vector<T>::capacity() == std::vector<T>::size?
-
+
The standard idiom for deallocating a
The copy will take O(n) time and the swap is constant time.
See Shrink-to-fit
strings for a similar solution for strings.
- Table of Contents
+
C++ applications often depend on specific language support
routines, say for throwing exceptions, or catching exceptions, and
perhaps also depend on features in the C++ Standard Library.
@@ -78,10 +58,10 @@ given compiler ABI. In a nutshell:
To use a specific version of the C++ ABI, one must use a
corresponding GNU C++ toolchain (i.e., g++ and libstdc++) that
implements the C++ ABI in question.
- The C++ interface has evolved throughout the history of the GNU
C++ toolchain. With each release, various details have been changed so
as to give distinct versions to the C++ interface.
- Extending existing, stable ABIs. Versioning gives subsequent
+ Extending existing, stable ABIs. Versioning gives subsequent
releases of library binaries the ability to add new symbols and add
functionality, all the while retaining compatibility with the previous
releases in the series. Thus, program binaries linked with the initial
@@ -95,7 +75,7 @@ binary in a release series (with additional symbols added), substitute
in the initial release of the library binary, and remain link
compatible.
Allows multiple, incompatible ABIs to coexist at the same time.
-
How can this complexity be managed? What does C++ versioning mean?
Because library and compiler changes often make binaries compiled
with one version of the GNU tools incompatible with binaries
@@ -211,7 +191,7 @@ compatible.
properly, they allow both the GNU C++ tools implementation, and
programs using them, an evolving yet controlled development that
maintains backward compatibility.
-
Minimum environment that supports a versioned ABI: A supported
dynamic linker, a GNU linker of sufficient vintage to understand
demangled C++ name globbing (ld) or the Sun linker, a shared
@@ -226,7 +206,7 @@ compatible.
Most modern GNU/Linux and BSD versions, particularly ones using
GCC 3.1 and later, will meet the
requirements above, as does Solaris 2.5 and up.
-
It turns out that most of the configure options that change
default behavior will impact the mangled names of exported
symbols, and thus impact versioning and compatibility.
@@ -244,7 +224,7 @@ compatible.
attempts to make sure that all the requirement for symbol
versioning are in place. For more information, please consult
acinclude.m4.
-
The following will cause the library minor version number to
increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
Adding an exported global or static data member Adding an exported function, static or non-virtual member function Adding an exported symbol or symbols by additional instantiations
Other allowed changes are possible.
-
The following non-exhaustive list will cause the library major version
number to increase, say from "libstdc++.so.3.0.4" to
"libstdc++.so.4.0.0".
@@ -316,7 +296,7 @@ class in registers, the compiler will be forced to use memory. See the
section on Function
Calling Conventions and APIs
of the C++ ABI documentation for further details.
-
Separation of interface and implementation
This is accomplished by two techniques that separate the API from
@@ -364,7 +344,7 @@ exceptional symbols are allowed to be visible.
Freezing the API Disallowed changes, as above, are not made on a stable release
branch. Enforcement tends to be less strict with GNU extensions that
-standard includes.
Testing for GNU C++ ABI changes is composed of two distinct
areas: testing the C++ compiler (g++) for compiler changes, and
testing the C++ library (libstdc++) for library changes.
@@ -430,7 +410,7 @@ and other detailed data is not displayed with this flag.
Perhaps there are other C++ ABI checkers. If so, please notify
us. We'd like to know about them!
-
A "C" application, dynamically linked to two shared libraries, liba,
libb. The dependent library liba is a C++ shared library compiled with
GCC 3.3, and uses io, exceptions, locale, etc. The dependent library
@@ -493,7 +473,7 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
This resulting binary, when executed, will be able to safely use
code from both liba, and the dependent libstdc++.so.6, and libb,
with the dependent libstdc++.so.5.
-
Some features in the C++ language make versioning especially
difficult. In particular, compiler generated constructs such as
implicit instantiations for templates, typeinfo information, and
@@ -506,51 +486,51 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.
24660: versioning weak symbols in libstdc++
19664: libstdc++ headers should have pop/push of the visibility around the declarations
- [biblio.abicheck]
ABIcheck
- . [biblio.cxxabi]
C++ ABI Summary
- .
How to Write Shared Libraries
- . Ulrich Drepper.
Dynamic Shared Objects: Survey and Issues
- .
+ .
ISO C++ J16/06-0046
- . Benjamin Kosnik.
Versioning With Namespaces
- .
+ .
ISO C++ J16/06-0083
- . Benjamin Kosnik.
Binary Compatibility of Shared Libraries Implemented in C++
on GNU/Linux Systems
- .
+ .
SYRCoSE 2009
- . Pavel Shved. Denis Silakov. Frequently Asked Questions Prev
+ vector<>
, iostreams, and algorithms.)
Programmers will no longer need to “roll their own”
nor be worried about platform-specific incompatibilities.
-
@@ -321,9 +317,9 @@
libstdc++.a
which you need are language support functions (those listed in
clause 18 of the
@@ -338,9 +334,9 @@
using anything from the rest of the library, such as IOStreams
or vectors, then you'll still need pieces from
libstdc++.a
.
- _XOPEN_SOURCE
and _GNU_SOURCE
are always defined?
- _XOPEN_SOURCE
. On GNU/Linux, the same happens
with _GNU_SOURCE
. (This is not an exhaustive list;
other macros and other platforms are also affected.)
@@ -446,15 +442,15 @@
quite a bit.
ctype.h
is broken! How can I fix it?
- locale
may be incomplete on non-GNU
@@ -516,9 +512,9 @@
C++98,
TR1, and
C++11.
-
- #include <fstream>
- ...
- std::fstream fs(“a_file”);
- // .
- // . do things with fs...
- // .
- fs.close();
- fs.open(“a_new_file”);
+
+ #include <fstream>
+ ...
+ std::fstream fs(“a_file”);
+ // .
+ // . do things with fs...
+ // .
+ fs.close();
+ fs.open(“a_new_file”);
fs
will fail, or at
least act very strangely. Yes, they often will, especially if
@@ -593,9 +589,9 @@
Update: for GCC 4.0 we implemented the resolution
of DR #409 and open()
now calls clear()
on success!
- -Weffc++
is used. Making
libstdc++ -Weffc++
-clean is not a goal of the project,
for a few reasons. Mainly, that option tries to enforce
@@ -605,9 +601,9 @@
We do, however, try to have libstdc++ sources as clean as possible. If
you see some simple changes that pacify -Weffc++
without other drawbacks, send us a patch.
- rel_ops
namespace and the template
comparison operator functions contained therein. If they become
visible in the same namespace as other comparison functions
@@ -617,9 +613,9 @@
sums
things up here. The collisions with vector/string iterator
types have been fixed for 3.1.
- ${prefix}/include/g++-3
, or if the installed
library's name looks like libstdc++-2.10.a
or
@@ -633,10 +629,10 @@
'v'?). Starting with version 3.2 the headers are installed in
${prefix}/include/c++/${version}
as this prevents
headers from previous versions being found by mistake.
-
- // compile your library components
- g++ -fPIC -c a.cc
- g++ -fPIC -c b.cc
- ...
- g++ -fPIC -c z.cc
-
- // create your library
- g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
-
- // link the executable
- g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl
-
+ // compile your library components
+ g++ -fPIC -c a.cc
+ g++ -fPIC -c b.cc
+ ...
+ g++ -fPIC -c z.cc
+
+ // create your library
+ g++ -fPIC -shared -rdynamic -o libfoo.so a.o b.o ... z.o
+
+ // link the executable
+ g++ -fPIC -rdynamic -o foo ... -L. -lfoo -ldl
+ &*i
. Future revisions
of the Standard are expected to bless this usage for
vector<> (but not for basic_string<>).
- vector<T>
's
unused memory is to create a temporary copy of the vector and swap their
contents, e.g. for vector<T> v
-
- std::vector<T>(v).swap(v);
+
+ std::vector<T>(v).swap(v);
The GNU C++ Library Next Next The GNU C++ Library Manual Next The GNU C++ Library Manual
Chapter 11.
+
+
+ | Next |
---|
Table of Contents
The neatest accomplishment of the algorithms section is that all the work is done via iterators, not containers directly. This means two important things: @@ -52,7 +42,7 @@ to cause so much confusion. Once you get range into your head (it's not that hard, honest!), then the algorithms are a cakewalk. -
If you call std::swap(x,y);
where x and y are standard
+
If you call std::swap(x,y);
where x and y are standard
containers, then the call will automatically be replaced by a call to
x.swap(y);
instead.
This allows member functions of each container class to take over, and @@ -62,7 +52,7 @@ fact use constant-time swaps.) This should not be surprising, since for two containers of the same type to swap contents, only some internal pointers to storage need to be exchanged. -
Prev | Up | Next | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Chapter 10.
+
|