From: redi Date: Fri, 11 Jun 2010 16:04:52 +0000 (+0000) Subject: 2010-06-11 Jonathan Wakely X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a8fcc169cbceb7238811ffdaae34573c8bed004;p=thirdparty%2Fgcc.git 2010-06-11 Jonathan Wakely * doc/xml/manual/appendix_contributing.xml: Indent code examples to match original C++STYLE document. Fix typos and syntax errors. Add some basic docbook markup. * doc/html/*: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160620 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b4750949e155..e2a1c9ae4c16 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2010-06-11 Jonathan Wakely + + * doc/xml/manual/appendix_contributing.xml: Indent code examples + to match original C++STYLE document. Fix typos and syntax errors. + Add some basic docbook markup. + * doc/html/*: Regenerate. + 2010-06-11 Jonathan Wakely PR libstdc++/44268 diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html index 16aee8fb7d6a..624339674bb6 100644 --- a/libstdc++-v3/doc/html/api.html +++ b/libstdc++-v3/doc/html/api.html @@ -7,7 +7,7 @@ FSF -


diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html index a4833c47532f..f245bebfd53d 100644 --- a/libstdc++-v3/doc/html/faq.html +++ b/libstdc++-v3/doc/html/faq.html @@ -4,7 +4,7 @@ 2008 FSF -



Bibliography

+

Bibliography

+ .

+ .

+ .

+ .

+ .

+ . Ulrich Drepper.

+ .

+ . Benjamin Kosnik.

+ . Benjamin Kosnik.

Chapter 11.  Algorithms - +

Table of Contents

Mutating
swap

The neatest accomplishment of the algorithms sect1 is that all the work is done via iterators, not containers directly. This means two diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 8bb60d28273f..45b2b378b24f 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 f7e1c5c37954..1864b97d84ca 100644 --- a/libstdc++-v3/doc/html/manual/appendix_contributing.html +++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html @@ -7,7 +7,7 @@ Appendices  Next


Appendix A.  Contributing - +

The GNU C++ Library follows an open development model. Active contributors are assigned maintainer-ship responsibility, and given @@ -25,7 +25,7 @@ organization is ANSI and their web-site is right here. (And if you've already registered with them, clicking this link will take you to directly to the place where you can - buy the standard on-line.) + buy the standard on-line.)

  • The library working group bugs, and known defects, can be obtained here: diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html index e633d028872b..15db4da3b0d0 100644 --- a/libstdc++-v3/doc/html/manual/appendix_free.html +++ b/libstdc++-v3/doc/html/manual/appendix_free.html @@ -7,7 +7,7 @@ Appendices  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 23edc550a457..e2258ccf2d39 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gpl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html @@ -78,7 +78,7 @@

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

    +

    TERMS AND CONDITIONS

    0. Definitions. @@ -619,7 +619,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 104689183e15..9a3e94b7ace9 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -7,7 +7,7 @@ Appendices  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/atomics.html b/libstdc++-v3/doc/html/manual/atomics.html index 1b14532a9aa7..317d66fce72a 100644 --- a/libstdc++-v3/doc/html/manual/atomics.html +++ b/libstdc++-v3/doc/html/manual/atomics.html @@ -7,7 +7,7 @@ Standard Contents  Next


    Chapter 14.  Atomics - +

    Table of Contents

    API Reference

    Facilities for atomic operations.

    API Reference

    diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index cd2a508362c3..02517c6cd949 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,25 +899,25 @@ 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

    Migrating to GCC 4.1 - . Dan Kegel.

    + . Dan Kegel.

    + . Martin Michlmayr.

    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 20.1. Bitmap Allocator Memory Map

    268042949672954294967295Data -> Space for 64 ints

    +

    Table 20.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/bk01pt03ch17s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html index bfa32155f362..c7a65a08a7a8 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -

    Table 17.1. Debugging Containers

    ContainerHeaderDebug containerDebug header
    std::bitsetbitset__gnu_debug::bitset<debug/bitset>
    std::dequedeque__gnu_debug::deque<debug/deque>
    std::listlist__gnu_debug::list<debug/list>
    std::mapmap__gnu_debug::map<debug/map>
    std::multimapmap__gnu_debug::multimap<debug/map>
    std::multisetset__gnu_debug::multiset<debug/set>
    std::setset__gnu_debug::set<debug/set>
    std::stringstring__gnu_debug::string<debug/string>
    std::wstringstring__gnu_debug::wstring<debug/string>
    std::basic_stringstring__gnu_debug::basic_string<debug/string>
    std::vectorvector__gnu_debug::vector<debug/vector>

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

    Table 17.1. Debugging Containers

    ContainerHeaderDebug containerDebug header
    std::bitsetbitset__gnu_debug::bitset<debug/bitset>
    std::dequedeque__gnu_debug::deque<debug/deque>
    std::listlist__gnu_debug::list<debug/list>
    std::mapmap__gnu_debug::map<debug/map>
    std::multimapmap__gnu_debug::multimap<debug/map>
    std::multisetset__gnu_debug::multiset<debug/set>
    std::setset__gnu_debug::set<debug/set>
    std::stringstring__gnu_debug::string<debug/string>
    std::wstringstring__gnu_debug::wstring<debug/string>
    std::basic_stringstring__gnu_debug::basic_string<debug/string>
    std::vectorvector__gnu_debug::vector<debug/vector>

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

    Table 17.2. Debugging Containers C++0x

    ContainerHeaderDebug containerDebug header
    std::unordered_mapunordered_map__gnu_debug::unordered_map<debug/unordered_map>
    std::unordered_multimapunordered_map__gnu_debug::unordered_multimap<debug/unordered_map>
    std::unordered_setunordered_set__gnu_debug::unordered_set<debug/unordered_set>
    std::unordered_multisetunordered_set__gnu_debug::unordered_multiset<debug/unordered_set>

    +

    Table 17.2. Debugging Containers C++0x

    ContainerHeaderDebug containerDebug header
    std::unordered_mapunordered_map__gnu_debug::unordered_map<debug/unordered_map>
    std::unordered_multimapunordered_map__gnu_debug::unordered_multimap<debug/unordered_map>
    std::unordered_setunordered_set__gnu_debug::unordered_set<debug/unordered_set>
    std::unordered_multisetunordered_set__gnu_debug::unordered_multiset<debug/unordered_set>

    diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html index 44a7535523eb..848eb0f4ccaf 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.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 18.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 18.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/bk01pt03ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html index 50b3875d7dba..1bf9fcf5f428 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html @@ -1,7 +1,7 @@ Design

    Design

    -

    Table 19.1. Profile 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 19.1. Profile 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/bk01pt03ch19s07.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html index 81865489ebe6..7a81a5615032 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.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 19.2. Profile Diagnostics

    GroupFlagBenefitCostFreq.Implemented 
    +

    Table 19.2. Profile 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/concurrency.html b/libstdc++-v3/doc/html/manual/concurrency.html index 07b47bd6b7f3..e65c5b3574fc 100644 --- a/libstdc++-v3/doc/html/manual/concurrency.html +++ b/libstdc++-v3/doc/html/manual/concurrency.html @@ -7,7 +7,7 @@ Standard Contents

     Next

    Chapter 15.  Concurrency - +

    Table of Contents

    API Reference

    Facilities for concurrent operation, and control thereof.

    API Reference

    diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html index b99c3c4d612a..185fa96bb602 100644 --- a/libstdc++-v3/doc/html/manual/containers.html +++ b/libstdc++-v3/doc/html/manual/containers.html @@ -7,7 +7,7 @@ Standard Contents

     Next

    Chapter 9.  Containers - +

    Sequences

    list

    list::size() is O(n)

    Yes it is, and that's okay. This is a decision that we preserved when we imported SGI's STL implementation. The following is diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html index 0a03b2458e6b..77f99ec3bdd1 100644 --- a/libstdc++-v3/doc/html/manual/diagnostics.html +++ b/libstdc++-v3/doc/html/manual/diagnostics.html @@ -7,7 +7,7 @@ Standard Contents  Next


    Chapter 5.  Diagnostics - +

    Exceptions

    API Reference

    All exception objects are defined in one of the standard header files: exception, diff --git a/libstdc++-v3/doc/html/manual/documentation_style.html b/libstdc++-v3/doc/html/manual/documentation_style.html index 064fa8fb682b..3ff11d186d24 100644 --- a/libstdc++-v3/doc/html/manual/documentation_style.html +++ b/libstdc++-v3/doc/html/manual/documentation_style.html @@ -108,7 +108,7 @@ 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

    +

    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, @@ -238,11 +238,11 @@ xmllint --noout --valid xml/index.xml online. An incomplete reference for HTML to Docbook conversion is detailed in the table below. -

    Table A.2. HTML to Docbook XML Markup Comparison

    HTMLDocbook
    <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.3. 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> diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html index d9dc83365716..18c4401b0d55 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 191b1d1814cc..00758626fac5 100644 --- a/libstdc++-v3/doc/html/manual/facets.html +++ b/libstdc++-v3/doc/html/manual/facets.html @@ -3,7 +3,7 @@ Facets

    Facets

    ctype

    Implementation

    Specializations

    +

     Next

    Facets

    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,26 +50,26 @@ 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 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 @@ -412,17 +412,17 @@ 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 - .

    + .

    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 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.

    + . Clive Feather. Extended Character Sets.

    The Unicode HOWTO - . Bruno Haible.

    + . Bruno Haible.

    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.

    + .

    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 - .

    + .

    API Specifications, Java Platform @@ -736,7 +736,7 @@ void test01() . java.util.Properties, java.text.MessageFormat, java.util.Locale, java.util.ResourceBundle - .

    + .

    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 62ab50f6bb8e..9825e4cf206e 100644 --- a/libstdc++-v3/doc/html/manual/io.html +++ b/libstdc++-v3/doc/html/manual/io.html @@ -7,7 +7,7 @@ Standard Contents  Next

    Chapter 13.  Input and Output - +

    Iostream Objects

    To minimize the time you have to wait on the compiler, it's good to only include the headers you really need. Many people simply include <iostream> when they don't need to -- and that can penalize diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html index 914fc0dd668c..8e0680bc6f14 100644 --- a/libstdc++-v3/doc/html/manual/iterators.html +++ b/libstdc++-v3/doc/html/manual/iterators.html @@ -7,7 +7,7 @@ Standard Contents  Next


    Chapter 10.  Iterators - +

    Predefined

    Iterators vs. Pointers

    The following FAQ entry points out that diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html index f9064b9ade1a..e8ee2189cade 100644 --- a/libstdc++-v3/doc/html/manual/localization.html +++ b/libstdc++-v3/doc/html/manual/localization.html @@ -7,7 +7,7 @@ Standard Contents  Next


    Chapter 8.  Localization - +

    Locales

    locale

    Describes the basic locale object, including nested classes id, facet, and the reference-counted implementation object, @@ -403,18 +403,18 @@ 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 - .

    + .

    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 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/memory.html b/libstdc++-v3/doc/html/manual/memory.html index f4a3c3250dbc..90899d16a295 100644 --- a/libstdc++-v3/doc/html/manual/memory.html +++ b/libstdc++-v3/doc/html/manual/memory.html @@ -93,7 +93,7 @@ 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 supported is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have @@ -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 @@ -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 @@ -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.

    + 20.4 Memory.

    + .

    + . Emery Berger.

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

    + . Emery Berger. Ben Zorn. Kathryn McKinley. Copyright © 2002 OOPSLA.

    Allocator Types @@ -340,9 +340,9 @@ . Klaus Kreft. Angelika Langer. C/C++ Users Journal - .

    The C++ Programming Language. Bjarne Stroustrup. Copyright © 2000 . 19.4 Allocators. + .

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

    Yalloc: A Recycling C++ Allocator. Felix Yen.

    auto_ptr

    Limitations

    Explaining all of the fun and delicious things that can + .

    Yalloc: A Recycling C++ Allocator. Felix Yen.

    auto_ptr

    Limitations

    Explaining all of the fun and delicious things that can happen with misuse of the auto_ptr class template (called AP here) would take some time. Suffice it to say that the use of AP @@ -458,7 +458,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 @@ -500,7 +500,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, @@ -558,7 +558,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 @@ -599,7 +599,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 @@ -610,7 +610,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 @@ -643,10 +643,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 @@ -694,7 +694,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

    + .

    + .

    + .

    Chapter 12.  Numerics - +

    Complex

    complex Processing

    Using complex<> becomes even more comple- er, sorry, diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html index c3086ca77f9f..7e42ddce2729 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 a7f38d38a513..81c732621e0c 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/source_code_style.html b/libstdc++-v3/doc/html/manual/source_code_style.html index dc4e49067ff8..8a45fe7dfd9f 100644 --- a/libstdc++-v3/doc/html/manual/source_code_style.html +++ b/libstdc++-v3/doc/html/manual/source_code_style.html @@ -191,58 +191,66 @@       __embedded_cplusplus
          // long double conversion members mangled as __opr
          // http://gcc.gnu.org/ml/libstdc++/1999-q4/msg00060.html
    -      _opr
    +      __opr
        

    By Example


          This library is written to appropriate C++ coding standards. As such,
          it is intended to precede the recommendations of the GNU Coding
          Standard, which can be referenced in full here:

    -      http://www.gnu.org/prep/standards/standards.html#Formatting
    +      http://www.gnu.org/prep/standards/standards.html#Formatting

          The rest of this is also interesting reading, but skip the "Design
          Advice" part.

          The GCC coding conventions are here, and are also useful:
    -      http://gcc.gnu.org/codingconventions.html
    +      http://gcc.gnu.org/codingconventions.html

          In addition, because it doesn't seem to be stated explicitly anywhere
          else, there is an 80 column source limit.

    -      ChangeLog entries for member functions should use the
    +      ChangeLog entries for member functions should use the
          classname::member function name syntax as follows:

    -      1999-04-15  Dennis Ritchie  <dr@att.com>
    +
    +1999-04-15  Dennis Ritchie  <dr@att.com>

          * src/basic_file.cc (__basic_file::open): Fix thinko in
          _G_HAVE_IO_FILE_OPEN bits.
    +


          Notable areas of divergence from what may be previous local practice
          (particularly for GNU C) include:

          01. Pointers and references
    -      char* p = "flop";
    -      char& c = *p;
    -      -NOT-
    -      char *p = "flop";  // wrong
    -      char &c = *p;      // wrong
    +      
    +        char* p = "flop";
    +        char& c = *p;
    +          -NOT-
    +        char *p = "flop";  // wrong
    +        char &c = *p;      // wrong
    +      


          Reason: In C++, definitions are mixed with executable code. Here,
    -      p is being initialized, not *p. This is near-universal
    +      p is being initialized, not *p.  This is near-universal
          practice among C++ programmers; it is normal for C hackers
          to switch spontaneously as they gain experience.

          02. Operator names and parentheses
    -      operator==(type)
    -      -NOT-
    -      operator == (type)  // wrong
    +      
    +        operator==(type)
    +          -NOT-
    +        operator == (type)  // wrong
    +      


    -      Reason: The == is part of the function name. Separating
    +      Reason: The == is part of the function name. Separating
          it makes the declaration look like an expression.

          03. Function names and parentheses
    -      void mangle()
    -      -NOT-
    -      void mangle ()  // wrong
    +      
    +        void mangle()
    +          -NOT-
    +        void mangle ()  // wrong
    +      


          Reason: no space before parentheses (except after a control-flow
          keyword) is near-universal practice for C++. It identifies the
    @@ -250,86 +258,98 @@       opposed to an expression or other overloaded use of parentheses.

          04. Template function indentation
    -      template<typename T>
    -      void
    -      template_function(args)
    -      { }
    -      -NOT-
    -      template<class T>
    -      void template_function(args) {};
    +      
    +        template<typename T>
    +          void
    +          template_function(args)
    +          { }
    +          -NOT-
    +        template<class T>
    +        void template_function(args) {};
    +      


          Reason: In class definitions, without indentation whitespace is
          needed both above and below the declaration to distinguish
          it visually from other members. (Also, re: "typename"
    -      rather than "class".)  T often could be int, which is
    +      rather than "class".)  T often could be int, which is
          not a class. ("class", here, is an anachronism.)

          05. Template class indentation
    -      template<typename _CharT, typename _Traits>
    -      class basic_ios : public ios_base
    -      {
    -      public:
    -      // Types:
    -      };
    -      -NOT-
    -      template<class _CharT, class _Traits>
    -      class basic_ios : public ios_base
    -      {
    -      public:
    -      // Types:
    -      };
    -      -NOT-
    -      template<class _CharT, class _Traits>
    -      class basic_ios : public ios_base
    -      {
    -      public:
    -      // Types:
    -      };
    +      
    +        template<typename _CharT, typename _Traits>
    +          class basic_ios : public ios_base
    +          {
    +          public:
    +            // Types:
    +          };
    +          -NOT-
    +        template<class _CharT, class _Traits>
    +        class basic_ios : public ios_base
    +          {
    +          public:
    +            // Types:
    +          };
    +          -NOT-
    +        template<class _CharT, class _Traits>
    +          class basic_ios : public ios_base
    +        {
    +          public:
    +            // Types:
    +        };
    +      


          06. Enumerators
    -      enum
    -      {
    -      space = _ISspace,
    -      print = _ISprint,
    -      cntrl = _IScntrl
    -      };
    -      -NOT-
    -      enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };
    +      
    +        enum
    +        {
    +          space = _ISspace,
    +          print = _ISprint,
    +          cntrl = _IScntrl
    +        };
    +          -NOT-
    +        enum { space = _ISspace, print = _ISprint, cntrl = _IScntrl };
    +      


          07. Member initialization lists
          All one line, separate from class name.

    -      gribble::gribble()
    -      : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
    -      { }
    -      -NOT-
    -      gribble::gribble() : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
    -      { }
    +      
    +        gribble::gribble()
    +        : _M_private_data(0), _M_more_stuff(0), _M_helper(0)
    +        { }
    +          -NOT-
    +        gribble::gribble() : _M_private_data(0), _M_more_stuff(0), _M_helper(0)
    +        { }
    +      


          08. Try/Catch blocks
    -      try
    -      {
    -      //
    -      }
    -      catch (...)
    -      {
    -      //
    -      }
    -      -NOT-
    -      try {
    -      //
    -      } catch(...) {
    -      //
    -      }
    +      
    +        try
    +          {
    +            //
    +          }
    +        catch (...)
    +          {
    +            //
    +          }
    +          -NOT-
    +        try {
    +          //
    +        } catch(...) {
    +          //
    +        }
    +      


          09. Member functions declarations and definitions
          Keywords such as extern, static, export, explicit, inline, etc
          go on the line above the function name. Thus

    +      
          virtual int
          foo()
          -NOT-
          virtual int foo()
    +      


          Reason: GNU coding conventions dictate return types for functions
          are on a separate line than the function name and parameter list
    @@ -340,42 +360,49 @@

          10. Invocation of member functions with "this->"
    -      For non-uglified names, use this->name to call the function.
    +      For non-uglified names, use this->name to call the function.

    +      
          this->sync()
          -NOT-
          sync()
    +      


          Reason: Koenig lookup.

          11. Namespaces
    +      
          namespace std
          {
    -      blah blah blah;
    +        blah blah blah;
          } // namespace std

          -NOT-

          namespace std {
    -      blah blah blah;
    +        blah blah blah;
          } // namespace std
    +      


          12. Spacing under protected and private in class declarations:
          space above, none below
          i.e.

    +      
          public:
    -      int foo;
    +        int foo;

          -NOT-
          public:

    -      int foo;
    +        int foo;
    +      


          13. Spacing WRT return statements.
          no extra spacing before returns, no parenthesis
          i.e.

    +      
          }
          return __ret;

    @@ -388,21 +415,22 @@
          }
          return (__ret);
    +      



          14. Location of global variables.
          All global variables of class type, whether in the "user visible"
    -      space (e.g., cin) or the implementation namespace, must be defined
    +      space (e.g., cin) or the implementation namespace, must be defined
          as a character array with the appropriate alignment and then later
          re-initialized to the correct value.

          This is due to startup issues on certain platforms, such as AIX.
    -      For more explanation and examples, see src/globals.cc. All such
    +      For more explanation and examples, see src/globals.cc. All such
          variables should be contained in that file, for simplicity.

          15. Exception abstractions
    -      Use the exception abstractions found in functexcept.h, which allow
    -      C++ programmers to use this library with -fno-exceptions. (Even if
    +      Use the exception abstractions found in functexcept.h, which allow
    +      C++ programmers to use this library with -fno-exceptions.  (Even if
          that is rarely advisable, it's a necessary evil for backwards
          compatibility.)

    @@ -410,9 +438,11 @@       All start with the name of the function where the exception is
          thrown, and then (optional) descriptive text is added. Example:

    +      
          __throw_logic_error(__N("basic_string::_S_construct NULL not valid"));
    +      


    -      Reason: The verbose terminate handler prints out exception::what(),
    +      Reason: The verbose terminate handler prints out exception::what(),
          as well as the typeinfo for the thrown exception. As this is the
          default terminate handler, by putting location info into the
          exception string, a very useful error message is printed out for
    @@ -432,21 +462,21 @@       to use names that begin with underscores. This is called "uglification".
          The convention is:

    -      Local and argument names:  __[a-z].*
    +      Local and argument names:  __[a-z].*

    -      Examples:  __count  __ix  __s1
    +      Examples:  __count  __ix  __s1

    -      Type names and template formal-argument names: _[A-Z][^_].*
    +      Type names and template formal-argument names: _[A-Z][^_].*

    -      Examples:  _Helper  _CharT  _N
    +      Examples:  _Helper  _CharT  _N

    -      Member data and function names: _M_.*
    +      Member data and function names: _M_.*

    -      Examples:  _M_num_elements  _M_initialize ()
    +      Examples:  _M_num_elements  _M_initialize ()

    -      Static data members, constants, and enumerations: _S_.*
    +      Static data members, constants, and enumerations: _S_.*

    -      Examples: _S_max_elements  _S_default_value
    +      Examples: _S_max_elements  _S_default_value

          Don't use names in the same scope that differ only in the prefix,
          e.g. _S_top and _M_top. See BADNAMES for a list of forbidden names.
    @@ -458,87 +488,88 @@       --------------------------

          [BY EXAMPLE]
    +      

          #ifndef  _HEADER_
          #define  _HEADER_ 1

          namespace std
          {
    -      class gribble
    -      {
    -      public:
    -      gribble() throw();
    +        class gribble
    +        {
    +        public:
    +          gribble() throw();

    -      gribble(const gribble&);
    +          gribble(const gribble&);

    -      explicit
    -      gribble(int __howmany);
    +          explicit
    +          gribble(int __howmany);

    -      gribble&
    -      operator=(const gribble&);
    +          gribble&
    +          operator=(const gribble&);

    -      virtual
    -      ~gribble() throw ();
    +          virtual
    +          ~gribble() throw ();

    -      // Start with a capital letter, end with a period.
    -      inline void
    -      public_member(const char* __arg) const;
    +          // Start with a capital letter, end with a period.
    +          inline void
    +          public_member(const char* __arg) const;

    -      // In-class function definitions should be restricted to one-liners.
    -      int
    -      one_line() { return 0 }
    +          // In-class function definitions should be restricted to one-liners.
    +          int
    +          one_line() { return 0 }

    -      int
    -      two_lines(const char* arg)
    -      { return strchr(arg, 'a'); }
    +          int
    +          two_lines(const char* arg)
    +          { return strchr(arg, 'a'); }

    -      inline int
    -      three_lines();  // inline, but defined below.
    +          inline int
    +          three_lines();  // inline, but defined below.

    -      // Note indentation.
    -      template<typename _Formal_argument>
    -      void
    -      public_template() const throw();
    +          // Note indentation.
    +          template<typename _Formal_argument>
    +            void
    +            public_template() const throw();

    -      template<typename _Iterator>
    -      void
    -      other_template();
    +          template<typename _Iterator>
    +            void
    +            other_template();

    -      private:
    -      class _Helper;
    +        private:
    +          class _Helper;

    -      int _M_private_data;
    -      int _M_more_stuff;
    -      _Helper* _M_helper;
    -      int _M_private_function();
    +          int _M_private_data;
    +          int _M_more_stuff;
    +          _Helper* _M_helper;
    +          int _M_private_function();

    -      enum _Enum
    -      {
    -      _S_one,
    -      _S_two
    -      };
    +          enum _Enum
    +            {
    +              _S_one,
    +              _S_two
    +            };

    -      static void
    -      _S_initialize_library();
    -      };
    +          static void
    +          _S_initialize_library();
    +        };

    -      // More-or-less-standard language features described by lack, not presence.
    +        // More-or-less-standard language features described by lack, not presence.
          # ifndef _G_NO_LONGLONG
    -      extern long long _G_global_with_a_good_long_name;  // avoid globals!
    +        extern long long _G_global_with_a_good_long_name;  // avoid globals!
          # endif

    -      // Avoid in-class inline definitions, define separately;
    -      // likewise for member class definitions:
    -      inline int
    -      gribble::public_member() const
    -      { int __local = 0; return __local; }
    +        // Avoid in-class inline definitions, define separately;
    +        // likewise for member class definitions:
    +        inline int
    +        gribble::public_member() const
    +        { int __local = 0; return __local; }

    -      class gribble::_Helper
    -      {
    -      int _M_stuff;
    +        class gribble::_Helper
    +        {
    +          int _M_stuff;

    -      friend class gribble;
    -      };
    +          friend class gribble;
    +        };
          }

          // Names beginning with "__": only for arguments and
    @@ -550,39 +581,40 @@
          namespace std
          {
    -      template<typename T>  // notice: "typename", not "class", no space
    -      long_return_value_type<with_many, args>
    -      function_name(char* pointer,               // "char *pointer" is wrong.
    -      char* argument,
    -      const Reference& ref)
    -      {
    -      // int a_local;  /* wrong; see below. */
    -      if (test)
    -      {
    -      nested code
    -      }
    -
    -      int a_local = 0;  // declare variable at first use.
    -
    -      //  char a, b, *p;   /* wrong */
    -      char a = 'a';
    -      char b = a + 1;
    -      char* c = "abc";  // each variable goes on its own line, always.
    -
    -      // except maybe here...
    -      for (unsigned i = 0, mask = 1; mask; ++i, mask <<= 1) {
    -      // ...
    -      }
    -      }
    -
    -      gribble::gribble()
    -      : _M_private_data(0), _M_more_stuff(0), _M_helper(0);
    -      { }
    -
    -      inline int
    -      gribble::three_lines()
    -      {
    -      // doesn't fit in one line.
    -      }
    +        template<typename T>  // notice: "typename", not "class", no space
    +          long_return_value_type<with_many, args>
    +          function_name(char* pointer,               // "char *pointer" is wrong.
    +                        char* argument,
    +                        const Reference& ref)
    +          {
    +            // int a_local;  /* wrong; see below. */
    +            if (test)
    +            {
    +              nested code
    +            }
    +
    +            int a_local = 0;  // declare variable at first use.
    +
    +            //  char a, b, *p;   /* wrong */
    +            char a = 'a';
    +            char b = a + 1;
    +            char* c = "abc";  // each variable goes on its own line, always.
    +
    +            // except maybe here...
    +            for (unsigned i = 0, mask = 1; mask; ++i, mask <<= 1) {
    +              // ...
    +            }
    +          }
    +
    +        gribble::gribble()
    +        : _M_private_data(0), _M_more_stuff(0), _M_helper(0)
    +        { }
    +
    +        int
    +        gribble::three_lines()
    +        {
    +          // doesn't fit in one line.
    +        }
          } // namespace std
    +      

        

    diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html index eb6dcdf811f6..81745a9563ef 100644 --- a/libstdc++-v3/doc/html/manual/spine.html +++ b/libstdc++-v3/doc/html/manual/spine.html @@ -2,7 +2,7 @@ The GNU C++ Library