diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a31f3f8f208c..138f82c42329 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2010-02-18 Benjamin Kosnik + + * doc/xml/manual/using.xml: Update. + * doc/xml/manual/status_cxx1998.xml: Same. + * doc/xml/manual/status_cxx200x.xml: Add link. + * doc/html/*: Regenerate. + + * testsuite/17_intro/freestanding.cc: Add. + 2010-02-18 Paolo Carlini * libsupc++/typeinfo: Add system_header pragma. diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html index 86e4e5e64c5e..61ddda971a26 100644 --- a/libstdc++-v3/doc/html/api.html +++ b/libstdc++-v3/doc/html/api.html @@ -5,7 +5,7 @@ FSF -

+


diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html index 96e8c9f08b62..31ba54106aaf 100644 --- a/libstdc++-v3/doc/html/faq.html +++ b/libstdc++-v3/doc/html/faq.html @@ -4,7 +4,7 @@ 2008 FSF -



Bibliography

+

Bibliography

ABIcheck, a vague idea of checking ABI compatibility . - .

+ .

C++ ABI Reference . - .

+ .

Intel® Compilers for Linux* -Compatibility with the GNU Compilers . - .

+ .

Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386) . - .

+ .

Sun Solaris 2.9 : C++ Migration Guide (document 816-2459) . - .

+ .

How to Write Shared Libraries . Ulrich Drepper. - .

+ .

C++ ABI for the ARM Architecture . - .

+ .

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 diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html index a2f5fe997244..6049cd8ec0e7 100644 --- a/libstdc++-v3/doc/html/manual/algorithms.html +++ b/libstdc++-v3/doc/html/manual/algorithms.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next


Part IX.  Algorithms - +

diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 473fddc44ea7..0b70a4cb1bce 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -75,11 +75,11 @@ _Alloc_traits have been removed. __alloc to select an underlying allocator that satisfied memory allocation requests. The selection of this underlying allocator was not user-configurable. -

Table B.1. Extension Allocators

Allocator (3.4)Header (3.4)Allocator (3.[0-3])Header (3.[0-3])
__gnu_cxx::new_allocator<T>ext/new_allocator.hstd::__new_allocmemory
__gnu_cxx::malloc_allocator<T>ext/malloc_allocator.hstd::__malloc_alloc_template<int>memory
__gnu_cxx::debug_allocator<T>ext/debug_allocator.hstd::debug_alloc<T>memory
__gnu_cxx::__pool_alloc<T>ext/pool_allocator.hstd::__default_alloc_template<bool,int>memory
__gnu_cxx::__mt_alloc<T>ext/mt_allocator.h
__gnu_cxx::bitmap_allocator<T>ext/bitmap_allocator.h

Releases after gcc-3.4 have continued to add to the collection +

Table B.1. Extension Allocators

Allocator (3.4)Header (3.4)Allocator (3.[0-3])Header (3.[0-3])
__gnu_cxx::new_allocator<T>ext/new_allocator.hstd::__new_allocmemory
__gnu_cxx::malloc_allocator<T>ext/malloc_allocator.hstd::__malloc_alloc_template<int>memory
__gnu_cxx::debug_allocator<T>ext/debug_allocator.hstd::debug_alloc<T>memory
__gnu_cxx::__pool_alloc<T>ext/pool_allocator.hstd::__default_alloc_template<bool,int>memory
__gnu_cxx::__mt_alloc<T>ext/mt_allocator.h
__gnu_cxx::bitmap_allocator<T>ext/bitmap_allocator.h

Releases after gcc-3.4 have continued to add to the collection of available allocators. All of these new allocators are standard-style. The following table includes details, along with the first released version of GCC that included the extension allocator. -

Table B.2. Extension Allocators Continued

AllocatorIncludeVersion
__gnu_cxx::array_allocator<T>ext/array_allocator.h4.0.0
__gnu_cxx::throw_allocator<T>ext/throw_allocator.h4.2.0

+

Table B.2. Extension Allocators Continued

AllocatorIncludeVersion
__gnu_cxx::array_allocator<T>ext/array_allocator.h4.0.0
__gnu_cxx::throw_allocator<T>ext/throw_allocator.h4.2.0

Debug mode first appears.

Precompiled header support PCH support. diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html index 8845f35377f1..422b57a813eb 100644 --- a/libstdc++-v3/doc/html/manual/appendix_contributing.html +++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html @@ -5,7 +5,7 @@ Prev The GNU C++ Library Next


Appendix A.  Contributing - +

The GNU C++ Library follows an open development model. Active contributors are assigned maintainer-ship responsibility, and given @@ -87,7 +87,7 @@ implementation.

  • A ChangeLog entry as plain text; see the various - ChangeLog files for format and content. If using you are + ChangeLog files for format and content. If you are using emacs as your editor, simply position the insertion point at the beginning of your change and hit CX-4a to bring up the appropriate ChangeLog entry. See--magic! Similar diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html index dda2b617f037..dd77c972f077 100644 --- a/libstdc++-v3/doc/html/manual/appendix_free.html +++ b/libstdc++-v3/doc/html/manual/appendix_free.html @@ -5,7 +5,7 @@ Prev The GNU C++ Library Next


  • Appendix C.  Free Software Needs Free Documentation - +

    The biggest deficiency in free operating systems is not in the software--it is the lack of good free manuals that we can include in diff --git a/libstdc++-v3/doc/html/manual/appendix_gpl.html b/libstdc++-v3/doc/html/manual/appendix_gpl.html index ad8b7447a242..5dd0a7da6d18 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gpl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html @@ -76,7 +76,7 @@

    The precise terms and conditions for copying, distribution and modification follow. -

    +

    TERMS AND CONDITIONS

    0. Definitions. @@ -617,7 +617,7 @@ waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. -

    +

    END OF TERMS AND CONDITIONS

    How to Apply These Terms to Your New Programs diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html index c42ba2d5329c..ef6924f28924 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -5,7 +5,7 @@ Prev The GNU C++ Library Next

    Appendix B.  Porting and Maintenance - +

    Configure and Build Hacking

    Prerequisites

    As noted previously, certain other tools are necessary for hacking on files that diff --git a/libstdc++-v3/doc/html/manual/associative.html b/libstdc++-v3/doc/html/manual/associative.html index 06a9de6aa3af..bf0731243c94 100644 --- a/libstdc++-v3/doc/html/manual/associative.html +++ b/libstdc++-v3/doc/html/manual/associative.html @@ -48,7 +48,7 @@ end(), then the item being inserted should have a key greater than all the other keys in the container. The item will be inserted at the end of the container, becoming - the new entry at end(). + the new entry before end().

  • neither begin() nor end(), then: Let h be the entry in the container pointed to diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index 2005bc924309..2844247f1840 100644 --- a/libstdc++-v3/doc/html/manual/backwards.html +++ b/libstdc++-v3/doc/html/manual/backwards.html @@ -17,8 +17,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of really useful things that are used by a lot of people, the Standards Committee couldn't include everything, and so a lot of those obvious classes didn't get included. -

    Known Issues include many of the limitations of its immediate ancestor.

    Portability notes and known implementation limitations are as follows.

    No ios_base

    At least some older implementations don't have std::ios_base, so you should use std::ios::badbit, std::ios::failbit and std::ios::eofbit and std::ios::goodbit. -

    No cout in ostream.h, no cin in istream.h

    +

    Known Issues include many of the limitations of its immediate ancestor.

    Portability notes and known implementation limitations are as follows.

    No ios_base

    At least some older implementations don't have std::ios_base, so you should use std::ios::badbit, std::ios::failbit and std::ios::eofbit and std::ios::goodbit. +

    No cout in ostream.h, no cin in istream.h

    In earlier versions of the standard, fstream.h, ostream.h @@ -44,7 +44,7 @@ considered replaced and rewritten. archived. The code is considered replaced and rewritten.

    Portability notes and known implementation limitations are as follows. -

    Namespace std:: not supported

    +

    Namespace std:: not supported

    Some care is required to support C++ compiler and or library implementation that do not have the standard library in namespace std. @@ -108,7 +108,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ]) fi ]) -

    Illegal iterator usage

    +

    Illegal iterator usage

    The following illustrate implementation-allowed illegal iterator use, and then correct use.

    • @@ -121,7 +121,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [

    • if (iterator) won't work any more => use if (iterator != iterator_type()) -

    isspace from cctype is a macro +

  • isspace from cctype is a macro

    Glibc 2.0.x and 2.1.x define ctype.h functionality as macros (isspace, isalpha etc.). @@ -154,7 +154,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ; (ctype.h) and the definitions in namespace std:: (<cctype>). -

    No vector::at, deque::at, string::at

    +

    No vector::at, deque::at, string::at

    One solution is to add an autoconf-test for this:

     AC_MSG_CHECKING(for container::at)
    @@ -180,7 +180,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
     

    If you are using other (non-GNU) compilers it might be a good idea to check for string::at separately. -

    No std::char_traits<char>::eof

    +

    No std::char_traits<char>::eof

    Use some kind of autoconf test, plus this:

     #ifdef HAVE_CHAR_TRAITS
    @@ -188,7 +188,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)],
     #else
     #define CPP_EOF EOF
     #endif
    -

    No string::clear

    +

    No string::clear

    There are two functions for deleting the contents of a string: clear and erase (the latter returns the string). @@ -206,12 +206,12 @@ erase(size_type __pos = 0, size_type __n = npos) Unfortunately, clear is not implemented in this version, so you should use erase (which is probably faster than operator=(charT*)). -

    +

    Removal of ostream::form and istream::scan extensions

    These are no longer supported. Please use stringstreams instead. -

    No basic_stringbuf, basic_stringstream

    +

    No basic_stringbuf, basic_stringstream

    Although the ISO standard i/ostringstream-classes are provided, (sstream), for compatibility with older implementations the pre-ISO @@ -299,14 +299,14 @@ any = temp; Another example of using stringstreams is in this howto.

    There is additional information in the libstdc++-v2 info files, in particular info iostream. -

    Little or no wide character support

    +

    Little or no wide character support

    Classes wstring and char_traits<wchar_t> are not supported. -

    No templatized iostreams

    +

    No templatized iostreams

    Classes wfilebuf and wstringstream are not supported. -

    Thread safety issues

    +

    Thread safety issues

    Earlier GCC releases had a somewhat different approach to threading configuration and proper compilation. Before GCC 3.0, configuration of the threading model was dictated by compiler @@ -364,7 +364,7 @@ libstdc++-v3. of the SGI STL (version 3.3), with extensive changes.

    A more formal description of the V3 goals can be found in the official design document. -

    Portability notes and known implementation limitations are as follows.

    Pre-ISO headers moved to backwards or removed

    The pre-ISO C++ headers +

    Portability notes and known implementation limitations are as follows.

    Pre-ISO headers moved to backwards or removed

    The pre-ISO C++ headers (iostream.h, defalloc.h etc.) are available, unlike previous libstdc++ versions, but inclusion generates a warning that you are using deprecated headers. @@ -436,7 +436,7 @@ like vector.h can be replaced with using namespace std; can be put at the global scope. This should be enough to get this code compiling, assuming the other usage is correct. -

    Extension headers hash_map, hash_set moved to ext or backwards

    At this time most of the features of the SGI STL extension have been +

    Extension headers hash_map, hash_set moved to ext or backwards

    At this time most of the features of the SGI STL extension have been replaced by standardized libraries. In particular, the unordered_map and unordered_set containers of TR1 are suitable replacement for the non-standard hash_map and hash_set @@ -508,7 +508,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [ AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ]) fi ]) -

    No ios::nocreate/ios::noreplace. +

    No ios::nocreate/ios::noreplace.

    The existence of ios::nocreate being used for input-streams has been confirmed, most probably because the author thought it would be more correct to specify nocreate explicitly. So @@ -519,7 +519,7 @@ open the file for reading, check if it has been opened, and then decide whether you want to create/replace or not. To my knowledge, even older implementations support app, ate and trunc (except for app ?). -

    +

    No stream::attach(int fd)

    Phil Edwards writes: It was considered and rejected for the ISO @@ -542,7 +542,7 @@ No stream::attach(int fd) For another example of this, refer to fdstream example by Nicolai Josuttis. -

    +

    Support for C++98 dialect.

    Check for complete library coverage of the C++1998/2003 standard.

    @@ -610,7 +610,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [
         AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ])
       fi
     ])
    -

    +

    Support for C++TR1 dialect.

    Check for library coverage of the TR1 standard.

    @@ -687,7 +687,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [
         AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ])
       fi
     ])
    -

    +

    Support for C++0x dialect.

    Check for baseline language coverage in the compiler for the C++0xstandard.

    @@ -899,27 +899,27 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [
         AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ])
       fi
     ])
    -

    +

    Container::iterator_type is not necessarily Container::value_type*

    This is a change in behavior from the previous version. Now, most iterator_type typedefs in container classes are POD objects, not value_type pointers. -

    Bibliography

    [ +

    Bibliography

    [ kegel41 ] Migrating to GCC 4.1 . Dan Kegel. - .

    [ + .

    [ kegel41 ] Building the Whole Debian Archive with GCC 4.1: A Summary . Martin Michlmayr. - .

    [ + .

    [ lbl32 ] Migration guide for GCC-3.2 diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html index fade26219d28..32a44a2bb2c5 100644 --- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html +++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html @@ -103,7 +103,7 @@ else return false.

    Consider a block of size 64 ints. In memory, it would look like this: (assume a 32-bit system where, size_t is a 32-bit entity). -

    Table 33.1. Bitmap Allocator Memory Map

    268042949672954294967295Data -> Space for 64 ints

    +

    Table 33.1. Bitmap Allocator Memory Map

    268042949672954294967295Data -> Space for 64 ints

    The first Column(268) represents the size of the Block in bytes as seen by the Bitmap Allocator. Internally, a global free list is used to keep track of the free blocks used and given back by the diff --git a/libstdc++-v3/doc/html/manual/bitset.html b/libstdc++-v3/doc/html/manual/bitset.html index 9cff276218f8..0d9fbeb2088d 100644 --- a/libstdc++-v3/doc/html/manual/bitset.html +++ b/libstdc++-v3/doc/html/manual/bitset.html @@ -49,7 +49,7 @@ that space savings.

    The problem is that vector<bool> doesn't - behave like a normal vector anymore. There have been recent + behave like a normal vector anymore. There have been journal articles which discuss the problems (the ones by Herb Sutter in the May and July/August 1999 issues of C++ Report cover it well). Future revisions of the ISO C++ Standard will change diff --git a/libstdc++-v3/doc/html/manual/bk01ix01.html b/libstdc++-v3/doc/html/manual/bk01ix01.html index ae63fa715d8b..185b1c4bd2ab 100644 --- a/libstdc++-v3/doc/html/manual/bk01ix01.html +++ b/libstdc++-v3/doc/html/manual/bk01ix01.html @@ -1,6 +1,6 @@ -Index

    Index

    A

    Algorithms, +Index

    Index

    A

    Algorithms, Algorithms
    Appendix
    Contributing, diff --git a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html index 76005e28134b..d88bbccff218 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt02pr01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt02pr01.html @@ -3,7 +3,7 @@

    Next


    This part deals with the functions called and objects created automatically during the course of a program's existence.

    diff --git a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html index 4736e67ff597..c81bbee976e1 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt09pr02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt09pr02.html @@ -3,7 +3,7 @@

    Next


    The neatest accomplishment of the algorithms chapter is that all the work is done via iterators, not containers directly. This means two important things: diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html index 81e2bfbe090b..2d56fc66378a 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch30s03.html @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -

    Table 30.1. Debugging Containers

    ContainerHeaderDebug containerDebug header
    std::bitsetbitset__gnu_debug::bitsetbitset
    std::dequedeque__gnu_debug::dequedeque
    std::listlist__gnu_debug::listlist
    std::mapmap__gnu_debug::mapmap
    std::multimapmap__gnu_debug::multimapmap
    std::multisetset__gnu_debug::multisetset
    std::setset__gnu_debug::setset
    std::stringstring__gnu_debug::stringstring
    std::wstringstring__gnu_debug::wstringstring
    std::basic_stringstring__gnu_debug::basic_stringstring
    std::vectorvector__gnu_debug::vectorvector

    In addition, when compiling in C++0x mode, these additional +

    Table 30.1. Debugging Containers

    ContainerHeaderDebug containerDebug header
    std::bitsetbitset__gnu_debug::bitsetbitset
    std::dequedeque__gnu_debug::dequedeque
    std::listlist__gnu_debug::listlist
    std::mapmap__gnu_debug::mapmap
    std::multimapmap__gnu_debug::multimapmap
    std::multisetset__gnu_debug::multisetset
    std::setset__gnu_debug::setset
    std::stringstring__gnu_debug::stringstring
    std::wstringstring__gnu_debug::wstringstring
    std::basic_stringstring__gnu_debug::basic_stringstring
    std::vectorvector__gnu_debug::vectorvector

    In addition, when compiling in C++0x mode, these additional containers have additional debug capability. -

    Table 30.2. Debugging Containers C++0x

    ContainerHeaderDebug containerDebug header
    std::unordered_mapunordered_map__gnu_debug::unordered_mapunordered_map
    std::unordered_multimapunordered_map__gnu_debug::unordered_multimapunordered_map
    std::unordered_setunordered_set__gnu_debug::unordered_setunordered_set
    std::unordered_multisetunordered_set__gnu_debug::unordered_multisetunordered_set

    +

    Table 30.2. Debugging Containers C++0x

    ContainerHeaderDebug containerDebug header
    std::unordered_mapunordered_map__gnu_debug::unordered_mapunordered_map
    std::unordered_multimapunordered_map__gnu_debug::unordered_multimapunordered_map
    std::unordered_setunordered_set__gnu_debug::unordered_setunordered_set
    std::unordered_multisetunordered_set__gnu_debug::unordered_multisetunordered_set

    diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html index 01b4e1b79d50..45d01b93b99d 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch31s03.html @@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags flags for atomic operations.)

    The following table provides the names and headers of all the parallel algorithms that can be used in a similar manner: -

    Table 31.1. Parallel Algorithms

    AlgorithmHeaderParallel algorithmParallel header
    std::accumulatenumeric__gnu_parallel::accumulateparallel/numeric
    std::adjacent_differencenumeric__gnu_parallel::adjacent_differenceparallel/numeric
    std::inner_productnumeric__gnu_parallel::inner_productparallel/numeric
    std::partial_sumnumeric__gnu_parallel::partial_sumparallel/numeric
    std::adjacent_findalgorithm__gnu_parallel::adjacent_findparallel/algorithm
    std::countalgorithm__gnu_parallel::countparallel/algorithm
    std::count_ifalgorithm__gnu_parallel::count_ifparallel/algorithm
    std::equalalgorithm__gnu_parallel::equalparallel/algorithm
    std::findalgorithm__gnu_parallel::findparallel/algorithm
    std::find_ifalgorithm__gnu_parallel::find_ifparallel/algorithm
    std::find_first_ofalgorithm__gnu_parallel::find_first_ofparallel/algorithm
    std::for_eachalgorithm__gnu_parallel::for_eachparallel/algorithm
    std::generatealgorithm__gnu_parallel::generateparallel/algorithm
    std::generate_nalgorithm__gnu_parallel::generate_nparallel/algorithm
    std::lexicographical_comparealgorithm__gnu_parallel::lexicographical_compareparallel/algorithm
    std::mismatchalgorithm__gnu_parallel::mismatchparallel/algorithm
    std::searchalgorithm__gnu_parallel::searchparallel/algorithm
    std::search_nalgorithm__gnu_parallel::search_nparallel/algorithm
    std::transformalgorithm__gnu_parallel::transformparallel/algorithm
    std::replacealgorithm__gnu_parallel::replaceparallel/algorithm
    std::replace_ifalgorithm__gnu_parallel::replace_ifparallel/algorithm
    std::max_elementalgorithm__gnu_parallel::max_elementparallel/algorithm
    std::mergealgorithm__gnu_parallel::mergeparallel/algorithm
    std::min_elementalgorithm__gnu_parallel::min_elementparallel/algorithm
    std::nth_elementalgorithm__gnu_parallel::nth_elementparallel/algorithm
    std::partial_sortalgorithm__gnu_parallel::partial_sortparallel/algorithm
    std::partitionalgorithm__gnu_parallel::partitionparallel/algorithm
    std::random_shufflealgorithm__gnu_parallel::random_shuffleparallel/algorithm
    std::set_unionalgorithm__gnu_parallel::set_unionparallel/algorithm
    std::set_intersectionalgorithm__gnu_parallel::set_intersectionparallel/algorithm
    std::set_symmetric_differencealgorithm__gnu_parallel::set_symmetric_differenceparallel/algorithm
    std::set_differencealgorithm__gnu_parallel::set_differenceparallel/algorithm
    std::sortalgorithm__gnu_parallel::sortparallel/algorithm
    std::stable_sortalgorithm__gnu_parallel::stable_sortparallel/algorithm
    std::unique_copyalgorithm__gnu_parallel::unique_copyparallel/algorithm

    +

    Table 31.1. Parallel Algorithms

    AlgorithmHeaderParallel algorithmParallel header
    std::accumulatenumeric__gnu_parallel::accumulateparallel/numeric
    std::adjacent_differencenumeric__gnu_parallel::adjacent_differenceparallel/numeric
    std::inner_productnumeric__gnu_parallel::inner_productparallel/numeric
    std::partial_sumnumeric__gnu_parallel::partial_sumparallel/numeric
    std::adjacent_findalgorithm__gnu_parallel::adjacent_findparallel/algorithm
    std::countalgorithm__gnu_parallel::countparallel/algorithm
    std::count_ifalgorithm__gnu_parallel::count_ifparallel/algorithm
    std::equalalgorithm__gnu_parallel::equalparallel/algorithm
    std::findalgorithm__gnu_parallel::findparallel/algorithm
    std::find_ifalgorithm__gnu_parallel::find_ifparallel/algorithm
    std::find_first_ofalgorithm__gnu_parallel::find_first_ofparallel/algorithm
    std::for_eachalgorithm__gnu_parallel::for_eachparallel/algorithm
    std::generatealgorithm__gnu_parallel::generateparallel/algorithm
    std::generate_nalgorithm__gnu_parallel::generate_nparallel/algorithm
    std::lexicographical_comparealgorithm__gnu_parallel::lexicographical_compareparallel/algorithm
    std::mismatchalgorithm__gnu_parallel::mismatchparallel/algorithm
    std::searchalgorithm__gnu_parallel::searchparallel/algorithm
    std::search_nalgorithm__gnu_parallel::search_nparallel/algorithm
    std::transformalgorithm__gnu_parallel::transformparallel/algorithm
    std::replacealgorithm__gnu_parallel::replaceparallel/algorithm
    std::replace_ifalgorithm__gnu_parallel::replace_ifparallel/algorithm
    std::max_elementalgorithm__gnu_parallel::max_elementparallel/algorithm
    std::mergealgorithm__gnu_parallel::mergeparallel/algorithm
    std::min_elementalgorithm__gnu_parallel::min_elementparallel/algorithm
    std::nth_elementalgorithm__gnu_parallel::nth_elementparallel/algorithm
    std::partial_sortalgorithm__gnu_parallel::partial_sortparallel/algorithm
    std::partitionalgorithm__gnu_parallel::partitionparallel/algorithm
    std::random_shufflealgorithm__gnu_parallel::random_shuffleparallel/algorithm
    std::set_unionalgorithm__gnu_parallel::set_unionparallel/algorithm
    std::set_intersectionalgorithm__gnu_parallel::set_intersectionparallel/algorithm
    std::set_symmetric_differencealgorithm__gnu_parallel::set_symmetric_differenceparallel/algorithm
    std::set_differencealgorithm__gnu_parallel::set_differenceparallel/algorithm
    std::sortalgorithm__gnu_parallel::sortparallel/algorithm
    std::stable_sortalgorithm__gnu_parallel::stable_sortparallel/algorithm
    std::unique_copyalgorithm__gnu_parallel::unique_copyparallel/algorithm

    diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html index f5e9b7df2d8e..3d3439b1fa3c 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s02.html @@ -1,7 +1,7 @@ Design

    Design

    -

    Table 32.1. Code Location

    Code LocationUse
    libstdc++-v3/include/std/*Preprocessor code to redirect to profile extension headers.
    libstdc++-v3/include/profile/*Profile extension public headers (map, vector, ...).
    libstdc++-v3/include/profile/impl/*Profile extension internals. Implementation files are +

    Table 32.1. Code Location

    Code LocationUse
    libstdc++-v3/include/std/*Preprocessor code to redirect to profile extension headers.
    libstdc++-v3/include/profile/*Profile extension public headers (map, vector, ...).
    libstdc++-v3/include/profile/impl/*Profile extension internals. Implementation files are only included from impl/profiler.h, which is the only file included from the public headers.

    Wrapper Model

    diff --git a/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html index 8bf346e3d239..390d5665ebc4 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html +++ b/libstdc++-v3/doc/html/manual/bk01pt12ch32s07.html @@ -18,7 +18,7 @@ A high accuracy means that the diagnostic is unlikely to be wrong. These grades are not perfect. They are just meant to guide users with specific needs or time budgets. -

    Table 32.2. Diagnostics

    GroupFlagBenefitCostFreq.Implemented
    +

    Table 32.2. Diagnostics

    Here we will make an attempt at describing the non-Standard extensions to the library. Some of these are from SGI's STL, some of these are GNU's, and some just seemed to appear on the doorstep. diff --git a/libstdc++-v3/doc/html/manual/codecvt.html b/libstdc++-v3/doc/html/manual/codecvt.html index e12197f9262d..1e45a2582cb0 100644 --- a/libstdc++-v3/doc/html/manual/codecvt.html +++ b/libstdc++-v3/doc/html/manual/codecvt.html @@ -337,41 +337,41 @@ codecvt usage.

  • wchar_t/char internal buffers and conversions between internal/external buffers? -

  • Bibliography

    +

    Bibliography

    The GNU C Library - . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    + . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    Correspondence - . Ulrich Drepper. Copyright © 2002 .

    + . Ulrich Drepper. Copyright © 2002 .

    ISO/IEC 14882:1998 Programming languages - C++ - . Copyright © 1998 ISO.

    + . Copyright © 1998 ISO.

    ISO/IEC 9899:1999 Programming languages - C - . Copyright © 1999 ISO.

    + . Copyright © 1999 ISO.

    The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) . Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - .

    + .

    The C++ Programming Language, Special Edition . Bjarne Stroustrup. Copyright © 2000 Addison Wesley, Inc.. Appendix D. Addison Wesley - .

    + .

    Standard C++ IOStreams and Locales . Advanced Programmer's Guide and Reference . Angelika Langer. Klaus Kreft. Copyright © 2000 Addison Wesley Longman, Inc.. Addison Wesley Longman - .

    + .

    A brief description of Normative Addendum 1 . Clive Feather. Extended Character Sets. - .

    + .

    The Unicode HOWTO . Bruno Haible. - .

    + .

    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html index 7f3899127463..746a9f4185a0 100644 --- a/libstdc++-v3/doc/html/manual/diagnostics.html +++ b/libstdc++-v3/doc/html/manual/diagnostics.html @@ -5,5 +5,5 @@
    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/manual/documentation_style.html b/libstdc++-v3/doc/html/manual/documentation_style.html index db06851461ec..39c0b446a978 100644 --- a/libstdc++-v3/doc/html/manual/documentation_style.html +++ b/libstdc++-v3/doc/html/manual/documentation_style.html @@ -56,18 +56,20 @@ other container-like types should read similarly to these member functions.

    - These points accompany the first list in section 3.1 of the - Doxygen manual: -

    1. Use the Javadoc style...

    2. + Some commentary to accompany + the first list in the Special + Documentation Blocks section of + the Doxygen manual: +

      1. For longer comments, use the Javadoc style...

      2. ...not the Qt style. The intermediate *'s are preferred.

      3. Use the triple-slash style only for one-line comments (the - brief mode). Very recent versions of Doxygen permit - full-mode comments in triple-slash blocks, but the - formatting still comes out wonky. + brief mode).

      4. This is disgusting. Don't do this.

      + Some specific guidelines: +

      Use the @-style of commands, not the !-style. Please be careful about whitespace in your markup comments. Most of the time it doesn't matter; doxygen absorbs most whitespace, and @@ -84,7 +86,25 @@ such as the names of function parameters. Use @e for emphasis when necessary. Use @c to refer to other standard names. (Examples of all these abound in the present code.) -

    Docbook

    Prerequisites

    +

    + Complicated math functions should use the multi-line + format. An example from random.h: +

    +


    +  /**
    +   * @brief A model of a linear congruential random number generator.
    +   *
    +   * @f[
    +   *     x_{i+1}\leftarrow(ax_{i} + c) \bmod m 
    +   * @f]
    +   */
    +

    +

    + Be careful about using certain, special characters when + writing Doxygen comments. Single and double quotes, and + separators in filenames are two common trouble spots. When in + doubt, consult the following table. +

    Table A.1. HTML to Doxygen markup comparison

    HTMLDoxygen
    \\\
    "\"
    '\'
    <i>@a word
    <b>@b word
    <code>@c word
    <em>@a word
    <em><em>two words or more</em>

    Docbook

    Prerequisites

    Editing the DocBook sources requires an XML editor. Many exist: some notable options include emacs, Kate, @@ -211,11 +231,11 @@ Complete details on Docbook markup can be found in the DocBook Element Reference, online. An incomplete reference for HTML to Docbook conversion is detailed in the table below. -

    Table A.1. HTML to Docbook XML markup comparison

    HTMLXML
    <p><para>
    <pre><computeroutput>, <programlisting>, +

    Table A.2. HTML to Docbook XML markup comparison

    HTMLDocbook
    <p><para>
    <pre><computeroutput>, <programlisting>, <literallayout>
    <ul><itemizedlist>
    <ol><orderedlist>
    <il><listitem>
    <dl><variablelist>
    <dt><term>
    <dd><listitem>
    <a href=""><ulink url="">
    <code><literal>, <programlisting>
    <strong><emphasis>
    <em><emphasis>
    "<quote>

    And examples of detailed markup for which there are no real HTML equivalents are listed in the table below. -

    Table A.2. Docbook XML Element Use

    ElementUse
    <structname><structname>char_traits</structname>
    <classname><classname>string</classname>
    <function> +

    Table A.3. Docbook XML Element Use

    ElementUse
    <structname><structname>char_traits</structname>
    <classname><classname>string</classname>
    <function>

    <function>clear()</function>

    <function>fs.clear()</function>

    <type><type>long long</type>
    <varname><varname>fs</varname>
    <literal> @@ -227,4 +247,5 @@ table below.
    <command><command>g++</command>
    <errortext><errortext>In instantiation of</errortext>
    <filename>

    <filename class="headerfile">ctype.h</filename>

    <filename class="directory">/home/gcc/build</filename>

    +

    <filename class="libraryfile">libstdc++.so</filename>


    diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html index 44890bc501b7..f441d4c8ad8d 100644 --- a/libstdc++-v3/doc/html/manual/extensions.html +++ b/libstdc++-v3/doc/html/manual/extensions.html @@ -5,5 +5,5 @@
    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/manual/facets.html b/libstdc++-v3/doc/html/manual/facets.html index 751b071b1f8c..ba3728e93d1f 100644 --- a/libstdc++-v3/doc/html/manual/facets.html +++ b/libstdc++-v3/doc/html/manual/facets.html @@ -3,7 +3,7 @@ Chapter 15. Facets aka Categories

    Chapter 15. Facets aka Categories

    ctype

    Implementation

    Specializations

    +

     Next

    Chapter 15. Facets aka Categories

    ctype

    Implementation

    Specializations

    For the required specialization codecvt<wchar_t, char, mbstate_t> , conversions are made between the internal character set (always UCS4 on GNU/Linux) and whatever the currently selected locale for the @@ -50,25 +50,25 @@ characters.

  • Rename abstract base class. See if just smash-overriding is a better approach. Clarify, add sanity to naming. -

  • Bibliography

    +

    Bibliography

    The GNU C Library - . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    + . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    Correspondence - . Ulrich Drepper. Copyright © 2002 .

    + . Ulrich Drepper. Copyright © 2002 .

    ISO/IEC 14882:1998 Programming languages - C++ - . Copyright © 1998 ISO.

    + . Copyright © 1998 ISO.

    ISO/IEC 9899:1999 Programming languages - C - . Copyright © 1999 ISO.

    + . Copyright © 1999 ISO.

    The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) . Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - .

    + .

    The C++ Programming Language, Special Edition . Bjarne Stroustrup. Copyright © 2000 Addison Wesley, Inc.. Appendix D. Addison Wesley - .

    + .

    Standard C++ IOStreams and Locales . Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html index 3142021f01fd..690722ffdf97 100644 --- a/libstdc++-v3/doc/html/manual/intro.html +++ b/libstdc++-v3/doc/html/manual/intro.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next


    + +
    diff --git a/libstdc++-v3/doc/html/manual/io.html b/libstdc++-v3/doc/html/manual/io.html index 16adf92259ed..90dbc6c52719 100644 --- a/libstdc++-v3/doc/html/manual/io.html +++ b/libstdc++-v3/doc/html/manual/io.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next
    diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html index e9e4860b8a28..d9a932be2288 100644 --- a/libstdc++-v3/doc/html/manual/iterators.html +++ b/libstdc++-v3/doc/html/manual/iterators.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next

    Part VIII.  Iterators - +

    diff --git a/libstdc++-v3/doc/html/manual/locales.html b/libstdc++-v3/doc/html/manual/locales.html index a3642e301441..040f79f21035 100644 --- a/libstdc++-v3/doc/html/manual/locales.html +++ b/libstdc++-v3/doc/html/manual/locales.html @@ -17,8 +17,8 @@ class facet

    Facets actually implement locale functionality. For instance, a facet -called numpunct is the data objects that can be used to query for the -thousands separator is in the German locale. +called numpunct is the data object that can be used to query for the +thousands separator in the locale.

    Literally, a facet is strictly defined:

    • @@ -398,25 +398,25 @@ global locale" (emphasis Paolo), that is: What should non-required facet instantiations do? If the generic implementation is provided, then how to end-users provide specializations? -

    Bibliography

    +

    Bibliography

    The GNU C Library - . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    + . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling and 7 Locales and Internationalization.

    Correspondence - . Ulrich Drepper. Copyright © 2002 .

    + . Ulrich Drepper. Copyright © 2002 .

    ISO/IEC 14882:1998 Programming languages - C++ - . Copyright © 1998 ISO.

    + . Copyright © 1998 ISO.

    ISO/IEC 9899:1999 Programming languages - C - . Copyright © 1999 ISO.

    + . Copyright © 1999 ISO.

    The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) . Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - .

    + .

    The C++ Programming Language, Special Edition . Bjarne Stroustrup. Copyright © 2000 Addison Wesley, Inc.. Appendix D. Addison Wesley - .

    + .

    Standard C++ IOStreams and Locales . Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html index 461cf62bf4a9..76d7c37db956 100644 --- a/libstdc++-v3/doc/html/manual/localization.html +++ b/libstdc++-v3/doc/html/manual/localization.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next


    diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html index f2e18f112ac4..18db2d502bfe 100644 --- a/libstdc++-v3/doc/html/manual/memory.html +++ b/libstdc++-v3/doc/html/manual/memory.html @@ -52,7 +52,7 @@ aid to locality if an implementation so desires. [20.4.1.1]/6

    - Complete details cam be found in the C++ standard, look in + Complete details can be found in the C++ standard, look in [20.4 Memory].

    Design Issues

    The easiest way of fulfilling the requirements is to call @@ -93,9 +93,9 @@ or loading and unloading shared objects in memory. As such, using caching allocators on systems that do not support abi::__cxa_atexit is not recommended. -

    Implementation

    Interface Design

    +

    Implementation

    Interface Design

    The only allocator interface that - is support is the standard C++ interface. As such, all STL + is supported is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have been modified to support this change.

    @@ -106,7 +106,7 @@

    The base class that allocator is derived from may not be user-configurable. -

    Selecting Default Allocation Policy

    +

    Selecting Default Allocation Policy

    It's difficult to pick an allocation strategy that will provide maximum utility, without excessively penalizing some behavior. In fact, it's difficult just deciding which typical actions to measure @@ -127,7 +127,7 @@ Insertion and erasure in a multi-threaded environment.

    This test shows the ability of the allocator to reclaim memory - on a pre-thread basis, as well as measuring thread contention + on a per-thread basis, as well as measuring thread contention for memory resources. Test source here. @@ -143,7 +143,7 @@ The current default choice for allocator is __gnu_cxx::new_allocator. -

    Disabling Memory Caching

    +

    Disabling Memory Caching

    In use, allocator may allocate and deallocate using implementation-specified strategies and heuristics. Because of this, every call to an allocator object's @@ -285,8 +285,8 @@

    The thr boolean determines whether the pool should be manipulated atomically or not. When thr = true, the allocator - is is thread-safe, while thr = - false, and is slightly faster but unsafe for + is thread-safe, while thr = + false, is slightly faster but unsafe for multiple threads.

    For thread-enabled configurations, the pool is locked with a @@ -308,11 +308,11 @@ A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own documentation, found here. -

    Bibliography

    +

    Bibliography

    ISO/IEC 14882:1998 Programming languages - C++ . isoc++_1998 - 20.4 Memory.

    The Standard Librarian: What Are Allocators Good + 20.4 Memory.

    The Standard Librarian: What Are Allocators Good . austernm Matt Austern. @@ -320,27 +320,27 @@ . - .

    The Hoard Memory Allocator. + .

    The Hoard Memory Allocator. emeryb Emery Berger. - .

    Reconsidering Custom Memory Allocation. + .

    Reconsidering Custom Memory Allocation. bergerzorn Emery Berger. Ben Zorn. Kathryn McKinley. Copyright © 2002 OOPSLA. - .

    Allocator Types. + .

    Allocator Types. kreftlanger Klaus Kreft. Angelika Langer. C/C++ Users Journal . - .

    The C++ Programming Language. + .

    The C++ Programming Language. tcpl Bjarne Stroustrup. Copyright © 2000 . 19.4 Allocators. Addison Wesley - .

    Yalloc: A Recycling C++ Allocator. + .

    Yalloc: A Recycling C++ Allocator. yenf Felix Yen. Copyright © .

    diff --git a/libstdc++-v3/doc/html/manual/messages.html b/libstdc++-v3/doc/html/manual/messages.html index 9ef28575f299..bd663dbf7423 100644 --- a/libstdc++-v3/doc/html/manual/messages.html +++ b/libstdc++-v3/doc/html/manual/messages.html @@ -241,38 +241,38 @@ void test01() model. As of this writing, it is unknown how to query to see if a specified message catalog exists using the gettext package. -

    Bibliography

    +

    Bibliography

    The GNU C Library . Roland McGrath. Ulrich Drepper. Copyright © 2007 FSF. Chapters 6 Character Set Handling, and 7 Locales and Internationalization - .

    + .

    Correspondence - . Ulrich Drepper. Copyright © 2002 .

    + . Ulrich Drepper. Copyright © 2002 .

    ISO/IEC 14882:1998 Programming languages - C++ - . Copyright © 1998 ISO.

    + . Copyright © 1998 ISO.

    ISO/IEC 9899:1999 Programming languages - C - . Copyright © 1999 ISO.

    + . Copyright © 1999 ISO.

    System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x) . Copyright © 1999 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - .

    + .

    The C++ Programming Language, Special Edition . Bjarne Stroustrup. Copyright © 2000 Addison Wesley, Inc.. Appendix D. Addison Wesley - .

    + .

    Standard C++ IOStreams and Locales . Advanced Programmer's Guide and Reference . Angelika Langer. Klaus Kreft. Copyright © 2000 Addison Wesley Longman, Inc.. Addison Wesley Longman - .

    + .

    Java 2 Platform, Standard Edition, v 1.3.1 API Specification . java.util.Properties, java.text.MessageFormat, java.util.Locale, java.util.ResourceBundle. - .

    + .

    GNU gettext tools, version 0.10.38, Native Language Support Library and Tools. . diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html index 0d447f7c904f..57089cf47e8e 100644 --- a/libstdc++-v3/doc/html/manual/numerics.html +++ b/libstdc++-v3/doc/html/manual/numerics.html @@ -5,5 +5,5 @@ Prev The GNU C++ Library Next


    diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html index 19cd7e1a079f..a21c3a65b2d5 100644 --- a/libstdc++-v3/doc/html/manual/parallel_mode.html +++ b/libstdc++-v3/doc/html/manual/parallel_mode.html @@ -13,11 +13,11 @@ explicit source declaration or by compiling existing sources with a specific compiler flag.

    Intro

    The following library components in the include numeric are included in the parallel mode:

    • std::accumulate

    • std::adjacent_difference

    • std::inner_product

    • std::partial_sum

    The following library components in the include -algorithm are included in the parallel mode:

    • std::adjacent_find

    • std::count

    • std::count_if

    • std::equal

    • std::find

    • std::find_if

    • std::find_first_of

    • std::for_each

    • std::generate

    • std::generate_n

    • std::lexicographical_compare

    • std::mismatch

    • std::search

    • std::search_n

    • std::transform

    • std::replace

    • std::replace_if

    • std::max_element

    • std::merge

    • std::min_element

    • std::nth_element

    • std::partial_sort

    • std::partition

    • std::random_shuffle

    • std::set_union

    • std::set_intersection

    • std::set_symmetric_difference

    • std::set_difference

    • std::sort

    • std::stable_sort

    • std::unique_copy

    Bibliography

    +algorithm are included in the parallel mode:

    • std::adjacent_find

    • std::count

    • std::count_if

    • std::equal

    • std::find

    • std::find_if

    • std::find_first_of

    • std::for_each

    • std::generate

    • std::generate_n

    • std::lexicographical_compare

    • std::mismatch

    • std::search

    • std::search_n

    • std::transform

    • std::replace

    • std::replace_if

    • std::max_element

    • std::merge

    • std::min_element

    • std::nth_element

    • std::partial_sort

    • std::partition

    • std::random_shuffle

    • std::set_union

    • std::set_intersection

    • std::set_symmetric_difference

    • std::set_difference

    • std::sort

    • std::stable_sort

    • std::unique_copy

    Bibliography

    Parallelization of Bulk Operations for STL Dictionaries . Johannes Singler. Leonor Frias. Copyright © 2007 . Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) - .

    + .

    The Multi-Core Standard Template Library . Johannes Singler. Peter Sanders. Felix Putze. Copyright © 2007 . Euro-Par 2007: Parallel Processing. (LNCS 4641) diff --git a/libstdc++-v3/doc/html/manual/profile_mode.html b/libstdc++-v3/doc/html/manual/profile_mode.html index a7f70c93e57d..408dba26f794 100644 --- a/libstdc++-v3/doc/html/manual/profile_mode.html +++ b/libstdc++-v3/doc/html/manual/profile_mode.html @@ -138,7 +138,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... call context. (Environment variable not supported.)

    -

    Bibliography

    +

    Bibliography

    Perflint: A Context Sensitive Performance Advisor for C++ Programs . Lixia Liu. Silvius Rus. Copyright © 2009 . Proceedings of the 2009 International Symposium on Code Generation diff --git a/libstdc++-v3/doc/html/manual/shared_ptr.html b/libstdc++-v3/doc/html/manual/shared_ptr.html index d61b6d5bf212..59666b93b16a 100644 --- a/libstdc++-v3/doc/html/manual/shared_ptr.html +++ b/libstdc++-v3/doc/html/manual/shared_ptr.html @@ -29,7 +29,7 @@ drops to zero. Derived classes override those functions to destroy resources in a context where the correct dynamic type is known. This is an application of the technique known as type erasure. -

    Implementation

    Class Hierarchy

    +

    Implementation

    Class Hierarchy

    A shared_ptr<T> contains a pointer of type T* and an object of type __shared_count. The shared_count contains a @@ -71,7 +71,7 @@ be forwarded to Tp's constructor. Unlike the other _Sp_counted_* classes, this one is parameterized on the type of object, not the type of pointer; this is purely a convenience that simplifies the implementation slightly. -

    Thread Safety

    +

    Thread Safety

    The interface of tr1::shared_ptr was extended for C++0x with support for rvalue-references and the other features from N2351. As with other libstdc++ headers shared by TR1 and C++0x, @@ -129,7 +129,7 @@ compiler, standard library, platform etc. For the version of shared_ptr in libstdc++ the compiler and library are fixed, which makes things much simpler: we have an atomic CAS or we don't, see Lock Policy below for details. -

    Selecting Lock Policy

    +

    Selecting Lock Policy

    There is a single _Sp_counted_base class, which is a template parameterized on the enum @@ -170,7 +170,7 @@ used when libstdc++ is built without --enable-threadsext/atomicity.h, which detect if the program is multi-threaded. If only one thread of execution exists in the program then less expensive non-atomic operations are used. -

    Dual C++0x and TR1 Implementation

    +

    Dual C++0x and TR1 Implementation

    The classes derived from _Sp_counted_base (see Class Hierarchy below) and __shared_count are implemented separately for C++0x and TR1, in bits/boost_sp_shared_count.h and @@ -181,7 +181,7 @@ The TR1 implementation is considered relatively stable, so is unlikely to change unless bug fixes require it. If the code that is common to both C++0x and TR1 modes needs to diverge further then it might be necessary to duplicate additional classes and only make changes to the C++0x versions. -

    Related functions and classes

    dynamic_pointer_cast, static_pointer_cast, +

    Related functions and classes

    dynamic_pointer_cast, static_pointer_cast, const_pointer_cast

    As noted in N2351, these functions can be implemented non-intrusively using the alias constructor. However the aliasing constructor is only available @@ -214,10 +214,10 @@ is called. Users should not try to use this. As well as the extra constructors, this implementation also needs some members of _Sp_counted_deleter to be protected where they could otherwise be private. -

    Use

    Examples

    +

    Use

    Examples

    Examples of use can be found in the testsuite, under testsuite/tr1/2_general_utilities/shared_ptr. -

    Unresolved Issues

    +

    Unresolved Issues

    The resolution to C++ Standard Library issue 674, "shared_ptr interface changes for consistency with N1856" will need to be implemented after it is accepted into the working @@ -265,7 +265,7 @@ be private. code to work with, Peter Dimov in particular for his help and invaluable advice on thread safety. Phillip Jordan and Paolo Carlini for the lock policy implementation. -

    Bibliography

    [ +

    Bibliography

    [ n2351 ] Improving shared_ptr for C++0x, Revision 2 @@ -274,7 +274,7 @@ be private. . - .

    [ + .

    [ n2456 ] C++ Standard Library Active Issues List (Revision R52) @@ -283,7 +283,7 @@ be private. . - .

    [ + .

    [ n2461 ] Working Draft, Standard for Programming Language C++ @@ -292,7 +292,7 @@ be private. . - .

    [ + .

    [ boostshared_ptr ] Boost C++ Libraries documentation - shared_ptr class template diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html index 91a3e8d8207f..f5e3d1ebd3a9 100644 --- a/libstdc++-v3/doc/html/manual/spine.html +++ b/libstdc++-v3/doc/html/manual/spine.html @@ -2,12 +2,12 @@ The GNU C++ Library

    The GNU C++ Library


    Table of Contents

    I. Introduction -
    1. Status
    Implementation Status
    C++ 1998/2003
    C++ 200x
    C++ TR1
    C++ TR 24733
    License
    The Code: GPL
    The Documentation: GPL, FDL
    Bugs
    Implementation Bugs
    Standard Bugs
    2. Setup
    Prerequisites
    Configure
    Make
    3. Using
    Linking Library Binary Files
    Headers
    Header Files
    Mixing Headers
    The C Headers and namespace std
    Precompiled Headers
    Namespaces
    Available Namespaces
    namespace std
    Using Namespace Composition
    Macros
    Concurrency
    Prerequisites
    Thread Safety
    Atomics
    IO
    Containers
    Exceptions
    Exception Safety
    Exception Neutrality
    Doing without
    Compatibility
    Debugging Support
    Using g++
    Debug Versions of Library Binary Files
    Memory Leak Hunting
    Using gdb
    Tracking uncaught exceptions
    Debug Mode
    Compile Time Checking
    Profile-based Performance Analysis
    II. +
    1. Status
    Implementation Status
    C++ 1998/2003
    C++ 200x
    C++ TR1
    C++ TR 24733
    License
    The Code: GPL
    The Documentation: GPL, FDL
    Bugs
    Implementation Bugs
    Standard Bugs
    2. Setup
    Prerequisites
    Configure
    Make
    3. Using
    Command Options
    Headers
    Header Files
    Mixing Headers
    The C Headers and namespace std
    Precompiled Headers
    Macros
    Namespaces
    Available Namespaces
    namespace std
    Using Namespace Composition
    Linking
    Almost Nothing
    Finding Dynamic or Shared Libraries
    Concurrency
    Prerequisites
    Thread Safety
    Atomics
    IO
    Containers
    Exceptions
    Exception Safety
    Exception Neutrality
    Doing without
    Compatibility
    Debugging Support
    Using g++
    Debug Versions of Library Binary Files
    Memory Leak Hunting
    Using gdb
    Tracking uncaught exceptions
    Debug Mode
    Compile Time Checking
    Profile-based Performance Analysis
    II. Support
    4. Types
    Fundamental Types
    Numeric Properties
    NULL
    5. Dynamic Memory
    6. Termination
    Termination Handlers
    Verbose Terminate Handler
    III. @@ -51,7 +51,7 @@
    D. GNU General Public License version 3 -
    E. GNU Free Documentation License
    Index

    Chapter 1. Status

    Implementation Status

    C++ 1998/2003

    Implementation Status

    This status table is based on the table of contents of ISO/IEC 14882:2003.

    -This page describes the C++0x support in mainline GCC SVN, not in any +This page describes the C++ support in mainline GCC SVN, not in any particular release. -

    Table 1.1. C++ 1998/2003 Implementation Status

    SectionDescriptionStatusComments
    +

    Table 1.1. C++ 1998/2003 Implementation Status

    SectionDescriptionStatusComments
    18 Language support @@ -148,14 +148,16 @@ Doc No: N3000=09-0190 Date: 2009-11-09 Working Draft, Standard for Programming Language C++

    In this implementation -std=gnu++0x or --std=c++0x flags must be used to enable language and -library features. The pre-defined symbol +-std=c++0x flags must be used to enable language +and library +features. See dialect +options. The pre-defined symbol __GXX_EXPERIMENTAL_CXX0X__ is used to check for the presence of the required flag.

    This page describes the C++0x support in mainline GCC SVN, not in any particular release. -

    Table 1.2. C++ 200x Implementation Status

    SectionDescriptionStatusComments
    +

    Table 1.2. C++ 200x Implementation Status

    SectionDescriptionStatusComments
    18 Language support @@ -227,7 +229,7 @@ In this implementation the header names are prefixed by

    This page describes the TR1 support in mainline GCC SVN, not in any particular release. -

    Table 1.3. C++ TR1 Implementation Status

    SectionDescriptionStatusComments
    2General Utilities
    2.1Reference wrappers  
    2.1.1Additions to header <functional> synopsisY 
    2.1.2Class template reference_wrapper  
    2.1.2.1reference_wrapper construct/copy/destroyY 
    2.1.2.2reference_wrapper assignmentY 
    2.1.2.3reference_wrapper accessY 
    2.1.2.4reference_wrapper invocationY 
    2.1.2.5reference_wrapper helper functionsY 
    2.2Smart pointers  
    2.2.1Additions to header <memory> synopsisY 
    2.2.2Class bad_weak_ptrY 
    2.2.3Class template shared_ptr  +

    Table 1.3. C++ TR1 Implementation Status

    SectionDescriptionStatusComments
    2General Utilities
    2.1Reference wrappers  
    2.1.1Additions to header <functional> synopsisY 
    2.1.2Class template reference_wrapper  
    2.1.2.1reference_wrapper construct/copy/destroyY 
    2.1.2.2reference_wrapper assignmentY 
    2.1.2.3reference_wrapper accessY 
    2.1.2.4reference_wrapper invocationY 
    2.1.2.5reference_wrapper helper functionsY 
    2.2Smart pointers  
    2.2.1Additions to header <memory> synopsisY 
    2.2.2Class bad_weak_ptrY 
    2.2.3Class template shared_ptr 

    Uses code from boost::shared_ptr. @@ -240,7 +242,7 @@ decimal floating-point arithmetic

    This page describes the TR 24733 support in mainline GCC SVN, not in any particular release. -

    Table 1.4. C++ TR 24733 Implementation Status

    SectionDescriptionStatusComments
    +

    Table 1.4. C++ TR 24733 Implementation Status

    SectionDescriptionStatusComments
    0 Introduction diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html index 61bf2da217a3..76fba6ee4333 100644 --- a/libstdc++-v3/doc/html/manual/strings.html +++ b/libstdc++-v3/doc/html/manual/strings.html @@ -5,5 +5,5 @@
    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/manual/support.html b/libstdc++-v3/doc/html/manual/support.html index 68ac28e3a8fc..14154ee46226 100644 --- a/libstdc++-v3/doc/html/manual/support.html +++ b/libstdc++-v3/doc/html/manual/support.html @@ -5,5 +5,5 @@
    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html index 0635955f8386..c5bcc1f54c3c 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -493,7 +493,7 @@ only default variables. reporting functions including:

    • time_counter

    • resource_counter

    • report_performance

    Special Topics

    Qualifying Exception Safety Guarantees - +

    Overview

    Testing is composed of running a particular test sequence, and looking at what happens to the surrounding code when diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html index e84ce3a1ba19..93114db3d577 100644 --- a/libstdc++-v3/doc/html/manual/using.html +++ b/libstdc++-v3/doc/html/manual/using.html @@ -3,42 +3,13 @@ Chapter 3. Using

    Chapter 3. Using

    Linking Library Binary Files

    - If you only built a static library (libstdc++.a), or if you - specified static linking, you don't have to worry about this. - But if you built a shared library (libstdc++.so) and linked - against it, then you will need to find that library when you run - the executable. +

     Next

    Chapter 3. Using

    Command Options

    + The set of features available in the GNU C++ library is shaped + by + several GCC + Command Options. Options that impact libstdc++ are + enumerated and detailed in the table below.

    - Methods vary for different platforms and different styles, but - the usual ones are printed to the screen during installation. - They include: -

    • - At runtime set LD_LIBRARY_PATH in your environment - correctly, so that the shared library for libstdc++ can be - found and loaded. Be certain that you understand all of the - other implications and behavior of LD_LIBRARY_PATH first - (few people do, and they get into trouble). -

    • - Compile the path to find the library at runtime into the - program. This can be done by passing certain options to - g++, which will in turn pass them on to the linker. The - exact format of the options is dependent on which linker you - use: -

      • - GNU ld (default on Linux):-Wl,--rpath,destdir/lib -

      • - IRIX ld: - -Wl,-rpath,destdir/lib -

      • - Solaris ld:-Wl,-Rdestdir/lib -

      • - More...? Let us know! -

    - Use the ldd utility to show which library the - system thinks it will get at runtime. -

    - A libstdc++.la file is also installed, for use with Libtool. If - you use Libtool to create your executables, these details are - taken care of for you. -

    + By default, g++ is equivalent to g++ -std=gnu++98. The standard library also defaults to this dialect. +

    Table 3.1. C++ Command Options

    Option FlagsDescription
    -std=c++98Use the 1998 ISO C++ standard plus amendments.
    -std=gnu++98As directly above, with GNU extensions.
    -std=c++0xUse the working draft of the upcoming ISO C++0x standard.
    -std=gnu++0xAs directly above, with GNU extensions.
    -fexceptionsSee exception-free dialect
    -frttiAs above, but RTTI-free dialect.
    -pthread or -pthreadsFor ISO C++0x <thread>, <future>, + <mutex>, or <condition_variable>.
    -fopenmpFor parallel mode.

    diff --git a/libstdc++-v3/doc/html/manual/using_concurrency.html b/libstdc++-v3/doc/html/manual/using_concurrency.html index 74b92b5b6c3c..f0f63a9eee2a 100644 --- a/libstdc++-v3/doc/html/manual/using_concurrency.html +++ b/libstdc++-v3/doc/html/manual/using_concurrency.html @@ -1,6 +1,6 @@ -Concurrency

    Concurrency

    This section discusses issues surrounding the proper compilation +Concurrency

    Concurrency

    This section discusses issues surrounding the proper compilation of multithreaded applications which use the Standard C++ library. This information is GCC-specific since the C++ standard does not address matters of multithreaded applications. @@ -36,7 +36,7 @@

    Thread Safety

    We currently use the SGI STL definition of thread safety.

    The library strives to be thread-safe when all of the following - conditions are met: + conditions are met:

    • The system's libc is itself thread-safe,

    • The compiler in use reports a thread model other than @@ -57,13 +57,13 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) Dependent Options.

    • An implementation of atomicity.h functions - exists for the architecture in question. See the internals documentation for more details. + exists for the architecture in question. See the internals documentation for more details.

    The user-code must guard against concurrent method calls which may - access any particular library object's state. Typically, the - application programmer may infer what object locks must be held - based on the objects referenced in a method call. Without getting - into great detail, here is an example which requires user-level - locks: + access any particular library object's state. Typically, the + application programmer may infer what object locks must be held + based on the objects referenced in a method call. Without getting + into great detail, here is an example which requires user-level + locks:

          library_class_a shared_object_a;
     
    @@ -74,8 +74,8 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
          }
     
          // Multiple copies of thread_main() are started in independent threads.

    Under the assumption that object_a and object_b are never exposed to - another thread, here is an example that should not require any - user-level locks: + another thread, here is an example that should not require any + user-level locks:

          thread_main () {
            library_class_a object_a;
    @@ -83,12 +83,12 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
            object_a.add_b (object_b);
            object_a.mutate ();
          } 

    All library objects are safe to use in a multithreaded program as - long as each thread carefully locks out access by any other - thread while it uses any object visible to another thread, i.e., - treat library objects like any other shared resource. In general, - this requirement includes both read and write access to objects; - unless otherwise documented as safe, do not assume that two threads - may access a shared standard library object at the same time. + long as each thread carefully locks out access by any other + thread while it uses any object visible to another thread, i.e., + treat library objects like any other shared resource. In general, + this requirement includes both read and write access to objects; + unless otherwise documented as safe, do not assume that two threads + may access a shared standard library object at the same time.

    Atomics

    IO

    This gets a bit tricky. Please read carefully, and bear with me.

    Structure

    A wrapper @@ -103,7 +103,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) the C stdio layer (again, see the link under Structure). We do no locking ourselves, but simply pass through to calls to fopen, fwrite, and so forth. -

    So, for 3.0, the question of "is multithreading safe for I/O" +

    So, for 3.0, the question of "is multithreading safe for I/O" must be answered with, "is your platform's C library threadsafe for I/O?" Some are by default, some are not; many offer multiple implementations of the C library with varying tradeoffs of threadsafety @@ -180,7 +180,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) code, we use the same definition of thread safety as SGI when discussing design. A key point that beginners may miss is the fourth major paragraph of the first page mentioned above - ("For most clients,"...), which points out that + (For most clients...), which points out that locking must nearly always be done outside the container, by client code (that'd be you, not us). There is a notable exceptions to this rule. Allocators called while a container or @@ -202,4 +202,4 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) useful are details on allocator options and capabilities. -

    +

    diff --git a/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html new file mode 100644 index 000000000000..9e48296929a6 --- /dev/null +++ b/libstdc++-v3/doc/html/manual/using_dynamic_or_shared.html @@ -0,0 +1,95 @@ + + +Linking

    Linking

    Almost Nothing

    + Or as close as it gets: freestanding. This is a minimal + configuration, with only partial support for the standard + library. Assume only the following header files can be used: +

    • + cstdarg +

    • + cstddef +

    • + cstdlib +

    • + exception +

    • + limits +

    • + new +

    • + exception +

    • + typeinfo +

    + In addition, throw in +

    • + cxxabi.h. +

    + In the + C++0x dialect add +

    • + initializer_list +

    • + type_traits +

    There exists a library that offers runtime support for + just these headers, and it is called + libsupc++.a. To use it, compile with gcc instead of g++, like so: +

    + gcc foo.cc -lsupc++ +

    + No attempt is made to verify that only the minimal subset + identified above is actually used at compile time. Violations + are diagnosed as undefined symbols at link time. +

    Finding Dynamic or Shared Libraries

    + If the only library built is the static library + (libstdc++.a), or if + specifying static linking, this section is can be skipped. But + if building or using a shared library + (libstdc++.so), then + additional location information will need to be provided. +

    + But how? +

    +A quick read of the relevant part of the GCC + manual, Compiling + C++ Programs, specifies linking against a C++ + library. More details from the + GCC FAQ, + which states GCC does not, by default, specify a + location so that the dynamic linker can find dynamic libraries at + runtime. +

    + Users will have to provide this information. +

    + Methods vary for different platforms and different styles, and + are printed to the screen during installation. To summarize: +

    • + At runtime set LD_LIBRARY_PATH in your + environment correctly, so that the shared library for + libstdc++ can be found and loaded. Be certain that you + understand all of the other implications and behavior + of LD_LIBRARY_PATH first. +

    • + Compile the path to find the library at runtime into the + program. This can be done by passing certain options to + g++, which will in turn pass them on to + the linker. The exact format of the options is dependent on + which linker you use: +

      • + GNU ld (default on Linux):-Wl,--rpath,destdir/lib +

      • + IRIX ld: + -Wl,-rpath,destdir/lib +

      • + Solaris ld:-Wl,-Rdestdir/lib +

    + Use the ldd utility on the linked executable + to show + which libstdc++.so + library the system will get at runtime. +

    + A libstdc++.la file is + also installed, for use with Libtool. If you use Libtool to + create your executables, these details are taken care of for + you. +

    diff --git a/libstdc++-v3/doc/html/manual/using_exceptions.html b/libstdc++-v3/doc/html/manual/using_exceptions.html index 70f83b459255..39fc1e05cfd4 100644 --- a/libstdc++-v3/doc/html/manual/using_exceptions.html +++ b/libstdc++-v3/doc/html/manual/using_exceptions.html @@ -266,7 +266,7 @@ is called. } catch(...) { this->_M_setstate(ios_base::badbit); } -

    Bibliography

    +

    Bibliography

    System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) . 2.9.5 Thread Cancellation @@ -274,44 +274,44 @@ is called. The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. - .

    + .

    Error and Exception Handling . David Abrahams . Boost . - .

    + .

    Exception-Safety in Generic Components . David Abrahams. Boost . - .

    + .

    Standard Library Exception Policy . Matt Austern. WG21 N1077 . - .

    + .

    ia64 c++ abi exception handling . Richard Henderson. GNU . - .

    + .

    Appendix E: Standard-Library Exception Safety . Bjarne Stroustrup. - .

    + .

    Exceptional C++ . Exception-Safety Issues and Techniques - . Herb Sutter.

    + . Herb Sutter.

    exception_defines.h #defines try/catch . GCC Bug 25191 diff --git a/libstdc++-v3/doc/html/manual/using_headers.html b/libstdc++-v3/doc/html/manual/using_headers.html index de2f9930235b..5ce54466d6fe 100644 --- a/libstdc++-v3/doc/html/manual/using_headers.html +++ b/libstdc++-v3/doc/html/manual/using_headers.html @@ -1,6 +1,6 @@ -Headers

    Headers

    Header Files

    +Headers

    Headers

    Header Files

    The C++ standard specifies the entire set of header files that must be available to all hosted implementations. Actually, the word "files" is a misnomer, since the contents of the @@ -10,7 +10,7 @@ how.

    That said, in practice files are used. -

    +

    There are two main types of include files: header files related to a specific version of the ISO C++ standard (called Standard Headers), and all others (TR1, C++ ABI, and Extensions). @@ -20,19 +20,19 @@ upcoming 200x standard.

    C++98/03 include files. These are available in the default compilation mode, i.e. -std=c++98 or -std=gnu++98. -

    Table 3.1. C++ 1998 Library Headers

    algorithmbitsetcomplexdequeexception
    fstreamfunctionaliomanipiosiosfwd
    iostreamistreamiteratorlimitslist
    localemapmemorynewnumeric
    ostreamqueuesetsstreamstack
    stdexceptstreambufstringutilitytypeinfo
    valarrayvector   

    Table 3.2. C++ 1998 Library Headers for C Library Facilities

    cassertcerrnocctypecfloatciso646
    climitsclocalecmathcsetjmpcsignal
    cstdargcstddefcstdiocstdlibcstring
    ctimecwcharcwctype  

    +

    Table 3.2. C++ 1998 Library Headers

    algorithmbitsetcomplexdequeexception
    fstreamfunctionaliomanipiosiosfwd
    iostreamistreamiteratorlimitslist
    localemapmemorynewnumeric
    ostreamqueuesetsstreamstack
    stdexceptstreambufstringutilitytypeinfo
    valarrayvector   

    Table 3.3. C++ 1998 Library Headers for C Library Facilities

    cassertcerrnocctypecfloatciso646
    climitsclocalecmathcsetjmpcsignal
    cstdargcstddefcstdiocstdlibcstring
    ctimecwcharcwctype  

    C++0x include files. These are only available in C++0x compilation mode, i.e. -std=c++0x or -std=gnu++0x. -

    Table 3.3. C++ 200x Library Headers

    algorithmarraybitsetchronocomplex
    condition_variabledequeexceptionforward_listfstream
    functionalfutureinitalizer_listiomanipios
    iosfwdiostreamistreamiteratorlimits
    listlocalemapmemorymutex
    newnumericostreamqueuerandom
    ratioregexsetsstreamstack
    stdexceptstreambufstringsystem_errorthread
    tupletype_traitstypeinfounordered_mapunordered_set
    utilityvalarrayvector  

    Table 3.4. C++ 200x Library Headers for C Library Facilities

    cassertccomplexcctypecerrnocfenv
    cfloatcinttypesciso646climitsclocale
    cmathcsetjmpcsignalcstdargcstdbool
    cstddefcstdintcstdlibcstdiocstring
    ctgmathctimecucharcwcharcwctype
    stdatomic.h    

    +

    Table 3.4. C++ 200x Library Headers

    algorithmarraybitsetchronocomplex
    condition_variabledequeexceptionforward_listfstream
    functionalfutureinitalizer_listiomanipios
    iosfwdiostreamistreamiteratorlimits
    listlocalemapmemorymutex
    newnumericostreamqueuerandom
    ratioregexsetsstreamstack
    stdexceptstreambufstringsystem_errorthread
    tupletype_traitstypeinfounordered_mapunordered_set
    utilityvalarrayvector  

    Table 3.5. C++ 200x Library Headers for C Library Facilities

    cassertccomplexcctypecerrnocfenv
    cfloatcinttypesciso646climitsclocale
    cmathcsetjmpcsignalcstdargcstdbool
    cstddefcstdintcstdlibcstdiocstring
    ctgmathctimecucharcwcharcwctype
    stdatomic.h    

    In addition, TR1 includes as: -

    Table 3.5. C++ TR 1 Library Headers

    tr1/arraytr1/complextr1/memorytr1/functionaltr1/random
    tr1/regextr1/tupletr1/type_traitstr1/unordered_maptr1/unordered_set
    tr1/utility    

    Table 3.6. C++ TR 1 Library Headers for C Library Facilities

    tr1/ccomplextr1/cfenvtr1/cfloattr1/cmathtr1/cinttypes
    tr1/climitstr1/cstdargtr1/cstdbooltr1/cstdinttr1/cstdio
    tr1/cstdlibtr1/ctgmathtr1/ctimetr1/cwchartr1/cwctype

    Decimal floating-point arithmetic is available if the C++ +

    Table 3.6. C++ TR 1 Library Headers

    tr1/arraytr1/complextr1/memorytr1/functionaltr1/random
    tr1/regextr1/tupletr1/type_traitstr1/unordered_maptr1/unordered_set
    tr1/utility    

    Table 3.7. C++ TR 1 Library Headers for C Library Facilities

    tr1/ccomplextr1/cfenvtr1/cfloattr1/cmathtr1/cinttypes
    tr1/climitstr1/cstdargtr1/cstdbooltr1/cstdinttr1/cstdio
    tr1/cstdlibtr1/ctgmathtr1/ctimetr1/cwchartr1/cwctype

    Decimal floating-point arithmetic is available if the C++ compiler supports scalar decimal floating-point types defined via __attribute__((mode(SD|DD|LD))). -

    Table 3.7. C++ TR 24733 Decimal Floating-Point Header

    decimal/decimal

    +

    Table 3.8. C++ TR 24733 Decimal Floating-Point Header

    decimal/decimal

    Also included are files for the C++ ABI interface: -

    Table 3.8. C++ ABI Headers

    cxxabi.hcxxabi_forced.h

    +

    Table 3.9. C++ ABI Headers

    cxxabi.hcxxabi_forced.h

    And a large variety of extensions. -

    Table 3.9. Extension Headers

    ext/algorithmext/atomicity.hext/array_allocator.hext/bitmap_allocator.hext/cast.h
    ext/codecvt_specializations.hext/concurrence.hext/debug_allocator.hext/enc_filebuf.hext/extptr_allocator.h
    ext/functionalext/iteratorext/malloc_allocator.hext/memoryext/mt_allocator.h
    ext/new_allocator.hext/numericext/numeric_traits.hext/pb_ds/assoc_container.hext/pb_ds/priority_queue.h
    ext/pod_char_traits.hext/pool_allocator.hext/rb_treeext/ropeext/slist
    ext/stdio_filebuf.hext/stdio_sync_filebuf.hext/throw_allocator.hext/typelist.hext/type_traits.h
    ext/vstring.h    

    Table 3.10. Extension Debug Headers

    debug/bitsetdebug/dequedebug/listdebug/mapdebug/set
    debug/stringdebug/unordered_mapdebug/unordered_setdebug/vector 

    Table 3.11. Extension Profile Headers

    profile/bitsetprofile/dequeprofile/listprofile/map
    profile/setprofile/unordered_mapprofile/unordered_setprofile/vector

    Table 3.12. Extension Parallel Headers

    parallel/algorithmparallel/numeric

    Mixing Headers

    A few simple rules. +

    Table 3.10. Extension Headers

    ext/algorithmext/atomicity.hext/array_allocator.hext/bitmap_allocator.hext/cast.h
    ext/codecvt_specializations.hext/concurrence.hext/debug_allocator.hext/enc_filebuf.hext/extptr_allocator.h
    ext/functionalext/iteratorext/malloc_allocator.hext/memoryext/mt_allocator.h
    ext/new_allocator.hext/numericext/numeric_traits.hext/pb_ds/assoc_container.hext/pb_ds/priority_queue.h
    ext/pod_char_traits.hext/pool_allocator.hext/rb_treeext/ropeext/slist
    ext/stdio_filebuf.hext/stdio_sync_filebuf.hext/throw_allocator.hext/typelist.hext/type_traits.h
    ext/vstring.h    

    Table 3.11. Extension Debug Headers

    debug/bitsetdebug/dequedebug/listdebug/mapdebug/set
    debug/stringdebug/unordered_mapdebug/unordered_setdebug/vector 

    Table 3.12. Extension Profile Headers

    profile/bitsetprofile/dequeprofile/listprofile/map
    profile/setprofile/unordered_mapprofile/unordered_setprofile/vector

    Table 3.13. Extension Parallel Headers

    parallel/algorithmparallel/numeric

    Mixing Headers

    A few simple rules.

    First, mixing different dialects of the standard headers is not possible. It's an all-or-nothing affair. Thus, code like

    @@ -60,7 +60,7 @@ same translation unit:
     	(<math.h> in this case), the symbols will be available
     	in the global namespace and perhaps in
     	namespace std:: (but this is no longer a firm
    -	requirement.) One the other hand, including the C++-style
    +	requirement.) On the other hand, including the C++-style
     	header (<cmath>) guarantees that the entities will be
     	found in namespace std and perhaps in the global namespace.
           

    @@ -94,11 +94,11 @@ will be used to compile other projects.

     g++ -Winvalid-pch -x c++-header -g -O2 -o ./stdc++.h.gch /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h
     

    The resulting file will be quite large: the current size is around thirty megabytes.

    How to use the resulting file.

    -g++ -I. -include stdc++.h  -H -g -O2 hello.cc 
    +g++ -I. -include stdc++.h  -H -g -O2 hello.cc
     

    Verification that the PCH file is being used is easy:

     g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
     ! ./stdc++.h.gch
     . /mnt/share/bld/H-x86-gcc.20071201/include/c++/4.3.0/iostream
     . /mnt/share/bld/H-x86-gcc.20071201include/c++/4.3.0/string
     

    The exclamation point to the left of the stdc++.h.gch listing means that the generated PCH file was used, and thus the

    Detailed information about creating precompiled header files can be found in the GCC documentation. -

    +

    diff --git a/libstdc++-v3/doc/html/manual/using_macros.html b/libstdc++-v3/doc/html/manual/using_macros.html index b8c7eeed7f9a..9daf4d3405ca 100644 --- a/libstdc++-v3/doc/html/manual/using_macros.html +++ b/libstdc++-v3/doc/html/manual/using_macros.html @@ -1,16 +1,22 @@ -Macros

    Macros

    All pre-processor switches and configurations are all gathered - in the file c++config.h, which is generated during - the libstdc++ configuration and build process, and included by - files part of the public libstdc++ API. Most of these macros +Macros

    Macros

    + All library macros begin with _GLIBCXX_. +

    + Furthermore, all pre-processor macros, switches, and + configuration options are gathered in the + file c++config.h, which + is generated during the libstdc++ configuration and build + process. This file is then included when needed by files part of + the public libstdc++ API, like <ios>. Most of these macros should not be used by consumers of libstdc++, and are reserved - for internal implementation use. These macros cannot be - redefined. However, a select handful of these macro - control libstdc++ extensions and extra features, or provide - versioning information for the API, and are able to be used. -

    All library macros begin with _GLIBCXX_ (except for - versions 3.1.x to 3.3.x, which use _GLIBCPP_). + for internal implementation use. These macros cannot + be redefined. +

    + A select handful of macros control libstdc++ extensions and extra + features, or provide versioning information for the API. Only + those macros listed below are offered for consideration by the + general public.

    Below is the macro which users may check for library version information.

    __GLIBCXX__

    The current version of libstdc++ in compressed ISO date format, form of an unsigned @@ -36,13 +42,13 @@ building/installing the library.

    _GLIBCXX_DEPRECATED

    Defined by default. Not configurable. ABI-changing. Turning this off - removes older ARM-style iostreams code, and other anachronisms - from the API. This macro is dependent on the version of the - standard being tracked, and as a result may give different results for - -std=c++98 and -std=c++0x. This may - be useful in updating old C++ code which no longer meet the - requirements of the language, or for checking current code - against new language standards. + removes older ARM-style iostreams code, and other anachronisms + from the API. This macro is dependent on the version of the + standard being tracked, and as a result may give different results for + -std=c++98 and -std=c++0x. This may + be useful in updating old C++ code which no longer meet the + requirements of the language, or for checking current code + against new language standards.

    _GLIBCXX_FORCE_NEW

    Undefined by default. When defined, memory allocation and allocators controlled by libstdc++ call operator new/delete @@ -65,4 +71,7 @@

    _GLIBCXX_PARALLEL

    Undefined by default. When defined, compiles user code using the parallel mode. -

    +

    _GLIBCXX_PROFILE

    Undefined by default. When defined, compiles user code + using the profile + mode. +

    diff --git a/libstdc++-v3/doc/html/manual/using_namespaces.html b/libstdc++-v3/doc/html/manual/using_namespaces.html index 820954208796..bb7fc39f57c2 100644 --- a/libstdc++-v3/doc/html/manual/using_namespaces.html +++ b/libstdc++-v3/doc/html/manual/using_namespaces.html @@ -1,6 +1,6 @@ -Namespaces

    Namespaces

    Available Namespaces

    There are three main namespaces. +Namespaces

    Namespaces

    Available Namespaces

    There are three main namespaces.

    • std

      The ISO C++ standards specify that "all library entities are defined within namespace std." This includes namespaces nested within namespace std, such as namespace @@ -11,7 +11,7 @@ but necessary for interoperability.

    • __gnu_

      Indicating one of several GNU extensions. Choices include __gnu_cxx, __gnu_debug, __gnu_parallel, and __gnu_pbds. -

    A complete list of implementation namespaces (including namespace contents) is available in the generated source documentation. +

    A complete list of implementation namespaces (including namespace contents) is available in the generated source documentation.

    namespace std

    One standard requirement is that the library components are defined in namespace std::. Thus, in order to use these types or @@ -21,7 +21,7 @@ and __gnu_pbds. std::string;) This approach works well for individual source files, but should not be used in a global context, like header files.

  • use a fully -qualified namefor each library symbol +qualified name for each library symbol (i.e. std::string, std::cout) Always can be used, and usually enhanced, by strategic use of typedefs. (In the cases where the qualified verbiage becomes unwieldy.) @@ -39,7 +39,7 @@ naming prefixes or macros, etc. namespace-definition: the imported symbol(s) gets imported into the currently active namespace(s). For example:

    -namespace gtk 
    +namespace gtk
     {
       using std::string;
       using std::tr1::array;
    @@ -49,8 +49,8 @@ namespace gtk
     

    In this example, std::string gets imported into namespace gtk. The result is that use of - std::string inside namespace gtk can just use string, without the explicit qualification. - As an added bonus, + std::string inside namespace gtk can just use string, without the explicit qualification. + As an added bonus, std::string does not get imported into the global namespace. Additionally, a more elaborate arrangement can be made for backwards compatibility and portability, whereby the using-declarations can wrapped in macros that @@ -58,4 +58,4 @@ namespace gtk std::string; (depending on whether the system has libstdc++ in std:: or not). (ideas from Llewelly and Karl Nelson) -

  • +

    diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html index 13240569a6fd..643a52964a93 100644 --- a/libstdc++-v3/doc/html/manual/utilities.html +++ b/libstdc++-v3/doc/html/manual/utilities.html @@ -5,5 +5,5 @@
    Prev The GNU C++ Library Next

    diff --git a/libstdc++-v3/doc/html/spine.html b/libstdc++-v3/doc/html/spine.html index 3adca29d62e0..edcf88aae343 100644 --- a/libstdc++-v3/doc/html/spine.html +++ b/libstdc++-v3/doc/html/spine.html @@ -5,7 +5,7 @@


    Table of Contents

    The GNU C++ Library
    I. Introduction -
    1. Status
    Implementation Status
    C++ 1998/2003
    C++ 200x
    C++ TR1
    C++ TR 24733
    License
    The Code: GPL
    The Documentation: GPL, FDL
    Bugs
    Implementation Bugs
    Standard Bugs
    2. Setup
    Prerequisites
    Configure
    Make
    3. Using
    Linking Library Binary Files
    Headers
    Header Files
    Mixing Headers
    The C Headers and namespace std
    Precompiled Headers
    Namespaces
    Available Namespaces
    namespace std
    Using Namespace Composition
    Macros
    Concurrency
    Prerequisites
    Thread Safety
    Atomics
    IO
    Containers
    Exceptions
    Exception Safety
    Exception Neutrality
    Doing without
    Compatibility
    Debugging Support
    Using g++
    Debug Versions of Library Binary Files
    Memory Leak Hunting
    Using gdb
    Tracking uncaught exceptions
    Debug Mode
    Compile Time Checking
    Profile-based Performance Analysis
    II. +
    1. Status
    Implementation Status
    C++ 1998/2003
    C++ 200x
    C++ TR1
    C++ TR 24733
    License
    The Code: GPL
    The Documentation: GPL, FDL
    Bugs
    Implementation Bugs
    Standard Bugs
    2. Setup
    Prerequisites
    Configure
    Make
    3. Using
    Command Options
    Headers
    Header Files
    Mixing Headers
    The C Headers and namespace std
    Precompiled Headers
    Macros
    Namespaces
    Available Namespaces
    namespace std
    Using Namespace Composition
    Linking
    Almost Nothing
    Finding Dynamic or Shared Libraries
    Concurrency
    Prerequisites
    Thread Safety
    Atomics
    IO
    Containers
    Exceptions
    Exception Safety
    Exception Neutrality
    Doing without
    Compatibility
    Debugging Support
    Using g++
    Debug Versions of Library Binary Files
    Memory Leak Hunting
    Using gdb
    Tracking uncaught exceptions
    Debug Mode
    Compile Time Checking
    Profile-based Performance Analysis
    II. Support
    4. Types
    Fundamental Types
    Numeric Properties
    NULL
    5. Dynamic Memory
    6. Termination
    Termination Handlers
    Verbose Terminate Handler
    III. diff --git a/libstdc++-v3/doc/xml/manual/status_cxx1998.xml b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml index 3548639d0256..ae182bd5cce2 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx1998.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx1998.xml @@ -22,7 +22,7 @@ This status table is based on the table of contents of ISO/IEC 14882:2003. -This page describes the C++0x support in mainline GCC SVN, not in any +This page describes the C++ support in mainline GCC SVN, not in any particular release. diff --git a/libstdc++-v3/doc/xml/manual/status_cxx200x.xml b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml index 02a9a05d7c35..c3864515479d 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx200x.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml @@ -22,8 +22,10 @@ Working Draft, Standard for Programming Language C++ In this implementation -std=gnu++0x or --std=c++0x flags must be used to enable language and -library features. The pre-defined symbol +-std=c++0x flags must be used to enable language +and library +features. See dialect +options. The pre-defined symbol __GXX_EXPERIMENTAL_CXX0X__ is used to check for the presence of the required flag. diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 7db334facb2b..ce218763190a 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -1,6 +1,6 @@ - @@ -8,73 +8,80 @@ Using - - Linking Library Binary Files + + + Command Options + + The set of features available in the GNU C++ library is shaped + by + several GCC + Command Options. Options that impact libstdc++ are + enumerated and detailed in the table below. + - If you only built a static library (libstdc++.a), or if you - specified static linking, you don't have to worry about this. - But if you built a shared library (libstdc++.so) and linked - against it, then you will need to find that library when you run - the executable. + By default, g++ is equivalent to g++ -std=gnu++98. The standard library also defaults to this dialect. - - Methods vary for different platforms and different styles, but - the usual ones are printed to the screen during installation. - They include: - - - - - At runtime set LD_LIBRARY_PATH in your environment - correctly, so that the shared library for libstdc++ can be - found and loaded. Be certain that you understand all of the - other implications and behavior of LD_LIBRARY_PATH first - (few people do, and they get into trouble). - - - - - Compile the path to find the library at runtime into the - program. This can be done by passing certain options to - g++, which will in turn pass them on to the linker. The - exact format of the options is dependent on which linker you - use: - - - - - GNU ld (default on Linux):-Wl,--rpath,destdir/lib - - - - - IRIX ld: - -Wl,-rpath,destdir/lib - - - - - Solaris ld:-Wl,-Rdestdir/lib - - - - - More...? Let us know! - - - - - - - Use the ldd utility to show which library the - system thinks it will get at runtime. - - - A libstdc++.la file is also installed, for use with Libtool. If - you use Libtool to create your executables, these details are - taken care of for you. - + + +C++ Command Options + + + + + + + Option Flags + Description + + + + + + -std=c++98 + Use the 1998 ISO C++ standard plus amendments. + + + + -std=gnu++98 + As directly above, with GNU extensions. + + + + -std=c++0x + Use the working draft of the upcoming ISO C++0x standard. + + + + -std=gnu++0x + As directly above, with GNU extensions. + + + + -fexceptions + See exception-free dialect + + + + -frtti + As above, but RTTI-free dialect. + + + + -pthread or -pthreads + For ISO C++0x <thread>, <future>, + <mutex>, or <condition_variable>. + + + + -fopenmp + For parallel mode. + + + + +
    +
    @@ -98,7 +105,7 @@ That said, in practice files are used. - + There are two main types of include files: header files related to a specific version of the ISO C++ standard (called Standard Headers), and all others (TR1, C++ ABI, and Extensions). @@ -731,7 +738,7 @@ thirty megabytes. How to use the resulting file. -g++ -I. -include stdc++.h -H -g -O2 hello.cc +g++ -I. -include stdc++.h -H -g -O2 hello.cc Verification that the PCH file is being used is easy: @@ -752,6 +759,147 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe + + + + Macros + + + All library macros begin with _GLIBCXX_. + + + + Furthermore, all pre-processor macros, switches, and + configuration options are gathered in the + file c++config.h, which + is generated during the libstdc++ configuration and build + process. This file is then included when needed by files part of + the public libstdc++ API, like <ios>. Most of these macros + should not be used by consumers of libstdc++, and are reserved + for internal implementation use. These macros cannot + be redefined. + + + + A select handful of macros control libstdc++ extensions and extra + features, or provide versioning information for the API. Only + those macros listed below are offered for consideration by the + general public. + + + Below is the macro which users may check for library version + information. + + + + __GLIBCXX__ + + The current version of + libstdc++ in compressed ISO date format, form of an unsigned + long. For details on the value of this particular macro for a + particular release, please consult this + document. + + + + + + Below are the macros which users may change with #define/#undef or + with -D/-U compiler flags. The default state of the symbol is + listed. + + Configurable (or Not configurable) means + that the symbol is initially chosen (or not) based on + --enable/--disable options at library build and configure time + (documented here), with the + various --enable/--disable choices being translated to + #define/#undef). + + + ABI means that changing from the default value may + mean changing the ABI of compiled code. In other words, these + choices control code which has already been compiled (i.e., in a + binary such as libstdc++.a/.so). If you explicitly #define or + #undef these macros, the headers may see different code + paths, but the libraries which you link against will not. + Experimenting with different values with the expectation of + consistent linkage requires changing the config headers before + building/installing the library. + + + + _GLIBCXX_DEPRECATED + + + Defined by default. Not configurable. ABI-changing. Turning this off + removes older ARM-style iostreams code, and other anachronisms + from the API. This macro is dependent on the version of the + standard being tracked, and as a result may give different results for + -std=c++98 and -std=c++0x. This may + be useful in updating old C++ code which no longer meet the + requirements of the language, or for checking current code + against new language standards. + + + + _GLIBCXX_FORCE_NEW + + + Undefined by default. When defined, memory allocation and + allocators controlled by libstdc++ call operator new/delete + without caching and pooling. Configurable via + --enable-libstdcxx-allocator. ABI-changing. + + + + + _GLIBCXX_CONCEPT_CHECKS + + + Undefined by default. Configurable via + --enable-concept-checks. When defined, performs + compile-time checking on certain template instantiations to + detect violations of the requirements of the standard. This + is described in more detail here. + + + + _GLIBCXX_DEBUG + + + Undefined by default. When defined, compiles user code using + the debug mode. + + + _GLIBCXX_DEBUG_PEDANTIC + + + Undefined by default. When defined while compiling with + the debug mode, makes + the debug mode extremely picky by making the use of libstdc++ + extensions and libstdc++-specific behavior into errors. + + + _GLIBCXX_PARALLEL + + Undefined by default. When defined, compiles user code + using the parallel + mode. + + + + _GLIBCXX_PROFILE + + Undefined by default. When defined, compiles user code + using the profile + mode. + + + + + + Namespaces @@ -786,7 +934,7 @@ and __gnu_pbds. - A complete list of implementation namespaces (including namespace contents) is available in the generated source documentation. + A complete list of implementation namespaces (including namespace contents) is available in the generated source documentation. @@ -838,7 +986,7 @@ naming prefixes or macros, etc. currently active namespace(s). For example: -namespace gtk +namespace gtk { using std::string; using std::tr1::array; @@ -849,8 +997,8 @@ namespace gtk In this example, std::string gets imported into namespace gtk. The result is that use of - std::string inside namespace gtk can just use string, without the explicit qualification. - As an added bonus, + std::string inside namespace gtk can just use string, without the explicit qualification. + As an added bonus, std::string does not get imported into the global namespace. Additionally, a more elaborate arrangement can be made for backwards compatibility and portability, whereby the using-declarations can wrapped in macros that @@ -864,131 +1012,200 @@ namespace gtk - - - Macros + + + Linking - All pre-processor switches and configurations are all gathered - in the file c++config.h, which is generated during - the libstdc++ configuration and build process, and included by - files part of the public libstdc++ API. Most of these macros - should not be used by consumers of libstdc++, and are reserved - for internal implementation use. These macros cannot be - redefined. However, a select handful of these macro - control libstdc++ extensions and extra features, or provide - versioning information for the API, and are able to be used. - + + Almost Nothing + + Or as close as it gets: freestanding. This is a minimal + configuration, with only partial support for the standard + library. Assume only the following header files can be used: + - All library macros begin with _GLIBCXX_ (except for - versions 3.1.x to 3.3.x, which use _GLIBCPP_). - + + + + cstdarg + + - Below is the macro which users may check for library version - information. + + + cstddef + + - - - __GLIBCXX__ + + + cstdlib + + + + + + exception + + + + + + limits + + + + + + new + + + + + + exception + + + + + + typeinfo + + + + + + In addition, throw in + + + + + + cxxabi.h. + + + + + + In the + C++0x dialect add + + + + + + initializer_list + + + + + type_traits + + + + + There exists a library that offers runtime support for + just these headers, and it is called + libsupc++.a. To use it, compile with gcc instead of g++, like so: + + + + gcc foo.cc -lsupc++ + + + + No attempt is made to verify that only the minimal subset + identified above is actually used at compile time. Violations + are diagnosed as undefined symbols at link time. + + + + + Finding Dynamic or Shared Libraries + + + If the only library built is the static library + (libstdc++.a), or if + specifying static linking, this section is can be skipped. But + if building or using a shared library + (libstdc++.so), then + additional location information will need to be provided. + + + But how? + + +A quick read of the relevant part of the GCC + manual, Compiling + C++ Programs, specifies linking against a C++ + library. More details from the + GCC FAQ, + which states GCC does not, by default, specify a + location so that the dynamic linker can find dynamic libraries at + runtime. + + + Users will have to provide this information. + + + Methods vary for different platforms and different styles, and + are printed to the screen during installation. To summarize: + + - The current version of - libstdc++ in compressed ISO date format, form of an unsigned - long. For details on the value of this particular macro for a - particular release, please consult this - document. + + At runtime set LD_LIBRARY_PATH in your + environment correctly, so that the shared library for + libstdc++ can be found and loaded. Be certain that you + understand all of the other implications and behavior + of LD_LIBRARY_PATH first. + + + + + + Compile the path to find the library at runtime into the + program. This can be done by passing certain options to + g++, which will in turn pass them on to + the linker. The exact format of the options is dependent on + which linker you use: + + + + + GNU ld (default on Linux):-Wl,--rpath,destdir/lib + + + + + IRIX ld: + -Wl,-rpath,destdir/lib + + + + + Solaris ld:-Wl,-Rdestdir/lib + + + + + + + Use the ldd utility on the linked executable + to show + which libstdc++.so + library the system will get at runtime. - - - - - Below are the macros which users may change with #define/#undef or - with -D/-U compiler flags. The default state of the symbol is - listed. - - Configurable (or Not configurable) means - that the symbol is initially chosen (or not) based on - --enable/--disable options at library build and configure time - (documented here), with the - various --enable/--disable choices being translated to - #define/#undef). - - - ABI means that changing from the default value may - mean changing the ABI of compiled code. In other words, these - choices control code which has already been compiled (i.e., in a - binary such as libstdc++.a/.so). If you explicitly #define or - #undef these macros, the headers may see different code - paths, but the libraries which you link against will not. - Experimenting with different values with the expectation of - consistent linkage requires changing the config headers before - building/installing the library. - - - - _GLIBCXX_DEPRECATED - - - Defined by default. Not configurable. ABI-changing. Turning this off - removes older ARM-style iostreams code, and other anachronisms - from the API. This macro is dependent on the version of the - standard being tracked, and as a result may give different results for - -std=c++98 and -std=c++0x. This may - be useful in updating old C++ code which no longer meet the - requirements of the language, or for checking current code - against new language standards. + + A libstdc++.la file is + also installed, for use with Libtool. If you use Libtool to + create your executables, these details are taken care of for + you. - - - _GLIBCXX_FORCE_NEW - - - Undefined by default. When defined, memory allocation and - allocators controlled by libstdc++ call operator new/delete - without caching and pooling. Configurable via - --enable-libstdcxx-allocator. ABI-changing. - - + + - _GLIBCXX_CONCEPT_CHECKS - - - Undefined by default. Configurable via - --enable-concept-checks. When defined, performs - compile-time checking on certain template instantiations to - detect violations of the requirements of the standard. This - is described in more detail here. - - - - _GLIBCXX_DEBUG - - - Undefined by default. When defined, compiles user code using - the debug mode. - - - _GLIBCXX_DEBUG_PEDANTIC - - - Undefined by default. When defined while compiling with - the debug mode, makes - the debug mode extremely picky by making the use of libstdc++ - extensions and libstdc++-specific behavior into errors. - - - _GLIBCXX_PARALLEL - - Undefined by default. When defined, compiles user code - using the parallel - mode. - - - - - - - Concurrency @@ -1046,7 +1263,7 @@ We currently use the The library strives to be thread-safe when all of the following - conditions are met: + conditions are met: @@ -1083,17 +1300,17 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) An implementation of atomicity.h functions - exists for the architecture in question. See the internals documentation for more details. + exists for the architecture in question. See the internals documentation for more details. The user-code must guard against concurrent method calls which may - access any particular library object's state. Typically, the - application programmer may infer what object locks must be held - based on the objects referenced in a method call. Without getting - into great detail, here is an example which requires user-level - locks: + access any particular library object's state. Typically, the + application programmer may infer what object locks must be held + based on the objects referenced in a method call. Without getting + into great detail, here is an example which requires user-level + locks: library_class_a shared_object_a; @@ -1106,8 +1323,8 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) // Multiple copies of thread_main() are started in independent threads. Under the assumption that object_a and object_b are never exposed to - another thread, here is an example that should not require any - user-level locks: + another thread, here is an example that should not require any + user-level locks: thread_main () { @@ -1117,12 +1334,12 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) object_a.mutate (); } All library objects are safe to use in a multithreaded program as - long as each thread carefully locks out access by any other - thread while it uses any object visible to another thread, i.e., - treat library objects like any other shared resource. In general, - this requirement includes both read and write access to objects; - unless otherwise documented as safe, do not assume that two threads - may access a shared standard library object at the same time. + long as each thread carefully locks out access by any other + thread while it uses any object visible to another thread, i.e., + treat library objects like any other shared resource. In general, + this requirement includes both read and write access to objects; + unless otherwise documented as safe, do not assume that two threads + may access a shared standard library object at the same time. @@ -1159,7 +1376,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) locking ourselves, but simply pass through to calls to fopen, fwrite, and so forth. - So, for 3.0, the question of "is multithreading safe for I/O" + So, for 3.0, the question of "is multithreading safe for I/O" must be answered with, "is your platform's C library threadsafe for I/O?" Some are by default, some are not; many offer multiple implementations of the C library with varying tradeoffs of threadsafety @@ -1262,7 +1479,7 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) code, we use the same definition of thread safety as SGI when discussing design. A key point that beginners may miss is the fourth major paragraph of the first page mentioned above - ("For most clients,"...), which points out that + (For most clients...), which points out that locking must nearly always be done outside the container, by client code (that'd be you, not us). There is a notable exceptions to this rule. Allocators called while a container or @@ -1286,18 +1503,18 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) useful are details on allocator options and capabilities. - + - - diff --git a/libstdc++-v3/testsuite/17_intro/freestanding.cc b/libstdc++-v3/testsuite/17_intro/freestanding.cc new file mode 100644 index 000000000000..9c5ec311a215 --- /dev/null +++ b/libstdc++-v3/testsuite/17_intro/freestanding.cc @@ -0,0 +1,50 @@ +// { dg-options "-x c -std=gnu++0x -lsupc++" } + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +int main() +{ + std::exception e; + + const char* str = typeid(e).name(); + + typedef std::numeric_limits limit_type; + limit_type limit_l; + int r = limit_type::radix; + + const char* cp = new char; + delete cp; + + bool b = std::is_integral::value; + + std::initializer_list ilisti; + + return 0; +}