From 1b4a6975f7e4ff26374f0ec942f40acdb12b643f Mon Sep 17 00:00:00 2001 From: Phil Edwards Date: Tue, 20 Nov 2001 00:51:37 +0000 Subject: [PATCH] Intro.3: More notes. 2001-11-19 Phil Edwards * docs/doxygen/Intro.3: More notes. * docs/doxygen/style.css: Update to default style from Doxygen 1.2.10. * include/bits/stl_algobase.h: Add doxygen hooks for functions. * include/ext/hash_map: Add @file hook. * include/ext/hash_set: Likewise. * include/ext/rope: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/slist: Likewise. * include/ext/stl_hash_fun.h: Likewise. * include/ext/stl_hashtable.h: Likewise. * include/ext/stl_rope.h: Likewise. * docs/html/17_intro/license.html: Remove "experimental" sentence. * docs/html/19_diagnostics/howto.html: Document new verbose terminate handler. * testsuite/27_io/filebuf.cc: Fix comment, move tweakable parameter to more visible (closer to description) position. * libsupc++/eh_type.cc: Formatting tweak. * libsupc++/exception: Likewise. * src/vterminate.cc: Likewise. * docs/html/17_intro/porting.html: Regenerate. * docs/html/faq/index.txt: Regenerate. From-SVN: r47193 --- libstdc++-v3/ChangeLog | 27 ++++ libstdc++-v3/docs/doxygen/Intro.3 | 3 +- libstdc++-v3/docs/doxygen/style.css | 11 +- libstdc++-v3/docs/html/17_intro/license.html | 3 - libstdc++-v3/docs/html/17_intro/porting.html | 4 +- libstdc++-v3/docs/html/19_diagnostics/howto.html | 59 ++++++++ libstdc++-v3/docs/html/faq/index.txt | 7 +- libstdc++-v3/include/bits/stl_algobase.h | 183 +++++++++++++++++++++++ libstdc++-v3/include/ext/hash_map | 5 +- libstdc++-v3/include/ext/hash_set | 5 +- libstdc++-v3/include/ext/rope | 5 + libstdc++-v3/include/ext/ropeimpl.h | 7 +- libstdc++-v3/include/ext/slist | 5 +- libstdc++-v3/include/ext/stl_hash_fun.h | 5 +- libstdc++-v3/include/ext/stl_hashtable.h | 5 +- libstdc++-v3/include/ext/stl_rope.h | 5 +- libstdc++-v3/libsupc++/eh_type.cc | 3 +- libstdc++-v3/libsupc++/exception | 3 +- libstdc++-v3/src/vterminate.cc | 3 +- libstdc++-v3/testsuite/27_io/filebuf.cc | 8 +- 20 files changed, 322 insertions(+), 34 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8ddd1af..42a766a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,30 @@ +2001-11-19 Phil Edwards + + * docs/doxygen/Intro.3: More notes. + * docs/doxygen/style.css: Update to default style from Doxygen 1.2.10. + * include/bits/stl_algobase.h: Add doxygen hooks for functions. + * include/ext/hash_map: Add @file hook. + * include/ext/hash_set: Likewise. + * include/ext/rope: Likewise. + * include/ext/ropeimpl.h: Likewise. + * include/ext/slist: Likewise. + * include/ext/stl_hash_fun.h: Likewise. + * include/ext/stl_hashtable.h: Likewise. + * include/ext/stl_rope.h: Likewise. + + * docs/html/17_intro/license.html: Remove "experimental" sentence. + * docs/html/19_diagnostics/howto.html: Document new verbose + terminate handler. + * testsuite/27_io/filebuf.cc: Fix comment, move tweakable parameter + to more visible (closer to description) position. + + * libsupc++/eh_type.cc: Formatting tweak. + * libsupc++/exception: Likewise. + * src/vterminate.cc: Likewise. + + * docs/html/17_intro/porting.html: Regenerate. + * docs/html/faq/index.txt: Regenerate. + 2001-11-18 Jason Merrill * libsupc++/eh_personality.cc (__cxa_call_unexpected): Take void*. diff --git a/libstdc++-v3/docs/doxygen/Intro.3 b/libstdc++-v3/docs/doxygen/Intro.3 index 6f4f3a5..b54bd55 100644 --- a/libstdc++-v3/docs/doxygen/Intro.3 +++ b/libstdc++-v3/docs/doxygen/Intro.3 @@ -15,7 +15,8 @@ All standard library entities are declared within and have manual entries beginning with "std_". For example, to see documentation of the template class .I std::vector -one would use "man std_vector". +one would use "man std_vector". Some entities do not have a separate man +page; for those see the main listing in "man Namespace_Std". .P All the man pages are automatically generated by Doxygen. For more information on this tool, see the HTML counterpart to these man pages. diff --git a/libstdc++-v3/docs/doxygen/style.css b/libstdc++-v3/docs/doxygen/style.css index 7f8e5b8..5b03b69 100644 --- a/libstdc++-v3/docs/doxygen/style.css +++ b/libstdc++-v3/docs/doxygen/style.css @@ -5,12 +5,15 @@ A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } +A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } DIV.fragment { width: 100%; border: none; background-color: #eeeeee } -DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } -TD.md { background-color: #f2f2ff } -DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } -DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } +TD.md { background-color: #f2f2ff; font-weight: bold; } +TD.mdname1 { background-color: #f2f2ff; font-weight: bold; font-style: italic; } +TD.mdname { background-color: #f2f2ff; font-weight: bold; font-style: italic; width: 600px; } +DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } +DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } FONT.keywordtype { color: #604020 } FONT.keywordflow { color: #e08000 } diff --git a/libstdc++-v3/docs/html/17_intro/license.html b/libstdc++-v3/docs/html/17_intro/license.html index f54ab23..c3449b1 100644 --- a/libstdc++-v3/docs/html/17_intro/license.html +++ b/libstdc++-v3/docs/html/17_intro/license.html @@ -13,9 +13,6 @@

Licenses for the Library

-

As long as this sentence is in place, this page isn't -official. It is still experimental if you are reading this.

-

There are two licenses affecting GNU libstdc++-v3: one for the code, and one for the documentation. Here we will describe both of them, and try to answer some of the widespread questions. If you have more questions, diff --git a/libstdc++-v3/docs/html/17_intro/porting.html b/libstdc++-v3/docs/html/17_intro/porting.html index b51fa9c..291393c 100644 --- a/libstdc++-v3/docs/html/17_intro/porting.html +++ b/libstdc++-v3/docs/html/17_intro/porting.html @@ -115,8 +115,8 @@ stream (or one hooked to a pipe) is not allowed by the OS. In this case, getc()/ungetc() will be used at some key locations in the library implementation instead of fseek(). Currently, the code path to avoid fseek() is only enabled when the seek size is 1 character away from the -current stream position. This is known to improve *-unknown-freebsd* -and sparc-sun-solaris2.*. +current stream position. This is known to improve *-unknown-freebsd*, +sparc-sun-solaris2.* and *-*-mingw32*.

Finally, you should bracket the entire file in an include-guard, like this: diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html index 0b6eb74..d30b5d9 100644 --- a/libstdc++-v3/docs/html/19_diagnostics/howto.html +++ b/libstdc++-v3/docs/html/19_diagnostics/howto.html @@ -26,6 +26,7 @@

  • Adding data to exceptions
  • Exception class hierarchy diagram
  • Concept checkers -- new and improved! +
  • Verbose terminate
    @@ -101,7 +102,65 @@

    Right now they are off by default. More will be added once GCC 3.0 is released and we have time to revisit this topic.

    +

    Return to top of page or + to the FAQ. +

    + +
    +

    Verbose terminate

    +

    If you are having difficulty with uncaught exceptions and want a + little bit of help debugging the causes of the core dumps, you can + make use of a GNU extension in GCC 3.1 and later: +

    +   #include <exception>
    +
    +   int main()
    +   {
    +       std::set_terminate (__gnu_cxx::verbose_terminate_handler);
    +       ...
    +       throw anything;
    +   }
    +

    +

    The verbose_terminate_handler function obtains the name + of the current exception, attempts to demangle it, and prints it to + stderr. If the exception is derived from std::exception + then the output from what() will be included. +

    +

    Any replacement termination function is required to kill the program + without returning; this one calls abort. +

    +

    For example: +

    +   #include <exception>
    +   #include <stdexcept>
    +
    +   struct BLARGH : std::runtime_error
    +   {
    +       BLARGH (const string& whatarg)
    +           : std::runtime_error(whatarg) { }
    +   };
     
    +   int main (int argc)
    +   {
    +       std::set_terminate (__gnu_cxx::verbose_terminate_handler);
    +       if (argc > 5)
    +           throw BLARGH("argc is greater than 5!");
    +       else
    +           throw argc;
    +   }
    +

    +

    In GCC 3.1 and later, this gives +

    +   % ./a.out
    +   terminate called after throwing a `int'
    +   Aborted
    +   % ./a.out f f f f f f f f f f f
    +   terminate called after throwing a `BLARGH'
    +   what(): argc is greater than 5!
    +   Aborted
    +   %
    + The 'Aborted' line comes from the call to abort(), of course. +

    Return to top of page or to the FAQ.

    diff --git a/libstdc++-v3/docs/html/faq/index.txt b/libstdc++-v3/docs/html/faq/index.txt index 4f687cd..4b7487b 100644 --- a/libstdc++-v3/docs/html/faq/index.txt +++ b/libstdc++-v3/docs/html/faq/index.txt @@ -643,9 +643,10 @@ a 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. This requirement includes - both read and write access to objects; do not assume that two threads - may read a shared standard container at the same time. + uses any object visible to another thread. 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. See chapters [84]17 (library introduction), [85]23 (containers), and [86]27 (I/O) for more information. diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index a26a8b5..b252eea 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/include/bits/stl_algobase.h @@ -155,6 +155,16 @@ namespace std if (__b < __a) return __b; return __a; } + /** + * @brief This does what you think it does. + * @param a A thing of arbitrary type. + * @param b Another thing of arbitrary type. + * @return The greater of the parameters. + * + * This is the simple classic generic implementation. It will work on + * temporary expressions, since they are only evaluated once, unlike a + * preprocessor macro. + */ template inline const _Tp& max(const _Tp& __a, const _Tp& __b) @@ -165,6 +175,16 @@ namespace std if (__a < __b) return __b; return __a; } + /** + * @brief This does what you think it does. + * @param a A thing of arbitrary type. + * @param b Another thing of arbitrary type. + * @param comp A @link s20_3_3_comparisons comparison functor@endlink. + * @return The lesser of the parameters. + * + * This will work on temporary expressions, since they are only evaluated + * once, unlike a preprocessor macro. + */ template inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) @@ -173,6 +193,16 @@ namespace std if (__comp(__b, __a)) return __b; return __a; } + /** + * @brief This does what you think it does. + * @param a A thing of arbitrary type. + * @param b Another thing of arbitrary type. + * @param comp A @link s20_3_3_comparisons comparison functor@endlink. + * @return The greater of the parameters. + * + * This will work on temporary expressions, since they are only evaluated + * once, unlike a preprocessor macro. + */ template inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) @@ -295,6 +325,19 @@ namespace std return __copy_ni2(__first, __last, __result, __Normal()); } + /** + * @brief Copies the range [first,last) into result. + * @param first An input iterator. + * @param last An input iterator. + * @param result An output iterator. + * @return result + (first - last) + * + * This inline function will boil down to a call to @c memmove whenever + * possible. Failing that, if random access iterators are passed, then the + * loop count will be known (and therefore a candidate for compiler + * optimizations such as unrolling). If the input range and the output + * range overlap, then the copy_backward function should be used instead. + */ template inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) @@ -419,6 +462,20 @@ namespace std __Normal()); } + /** + * @brief Copies the range [first,last) into result. + * @param first An input iterator. + * @param last An input iterator. + * @param result An output iterator. + * @return result - (first - last) + * + * The function has the same effect as copy, but starts at the end of the + * range and works its way to the start, returning the start of the result. + * This inline function will boil down to a call to @c memmove whenever + * possible. Failing that, if random access iterators are passed, then the + * loop count will be known (and therefore a candidate for compiler + * optimizations such as unrolling). + */ template inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) @@ -462,6 +519,20 @@ namespace std return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result)); } + /** + * @brief Copies the range [first,first+count) into [result,result+count). + * @param first An input iterator. + * @param count The number of elements to copy. + * @param result An output iterator. + * @return A std::pair composed of first+count and result+count. + * + * This is an SGI extension. + * This inline function will boil down to a call to @c memmove whenever + * possible. Failing that, if random access iterators are passed, then the + * loop count will be known (and therefore a candidate for compiler + * optimizations such as unrolling). + * @ingroup SGIextensions + */ template inline pair<_InputIter, _OutputIter> copy_n(_InputIter __first, _Size __count, _OutputIter __result) @@ -478,6 +549,17 @@ namespace std // fill and fill_n + /** + * @brief Fills the range [first,last) with copies of value. + * @param first A forward iterator. + * @param last A forward iterator. + * @param value A reference-to-const of arbitrary type. + * @return Nothing. + * + * This function fills a range with copies of the same value. For one-byte + * types filling contiguous areas of memory, this becomes an inline call to + * @c memset. + */ template void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value) @@ -489,6 +571,17 @@ namespace std *__first = __value; } + /** + * @brief Fills the range [first,first+n) with copies of value. + * @param first An output iterator. + * @param n The count of copies to perform. + * @param value A reference-to-const of arbitrary type. + * @return The iterator at first+n. + * + * This function fills a range with copies of the same value. For one-byte + * types filling contiguous areas of memory, this becomes an inline call to + * @c memset. + */ template _OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __value) @@ -552,6 +645,18 @@ namespace std //-------------------------------------------------- // equal and mismatch + /** + * @brief Finds the places in ranges which don't match. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @return A pair of iterators pointing to the first mismatch. + * + * This compares the elements of two ranges using @c == and returns a pair + * of iterators. The first iterator points into the first range, the + * second iterator points into the second range, and the elements pointed + * to by the iterators are not equal. + */ template pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, _InputIter1 __last1, @@ -572,6 +677,20 @@ namespace std return pair<_InputIter1, _InputIter2>(__first1, __first2); } + /** + * @brief Finds the places in ranges which don't match. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @param binary_pred A binary predicate @link s20_3_1_base functor@endlink. + * @return A pair of iterators pointing to the first mismatch. + * + * This compares the elements of two ranges using the binary_pred + * parameter, and returns a pair + * of iterators. The first iterator points into the first range, the + * second iterator points into the second range, and the elements pointed + * to by the iterators are not equal. + */ template pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, _InputIter1 __last1, @@ -589,6 +708,17 @@ namespace std return pair<_InputIter1, _InputIter2>(__first1, __first2); } + /** + * @brief Tests a range for element-wise equality. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @return A boolean true or false. + * + * This compares the elements of two ranges using @c == and returns true or + * false depending on whether all of the corresponding elements of the + * ranges are equal. + */ template inline bool equal(_InputIter1 __first1, _InputIter1 __last1, @@ -607,6 +737,19 @@ namespace std return true; } + /** + * @brief Tests a range for element-wise equality. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @param binary_pred A binary predicate @link s20_3_1_base functor@endlink. + * @return A boolean true or false. + * + * This compares the elements of two ranges using the binary_pred + * parameter, and returns true or + * false depending on whether all of the corresponding elements of the + * ranges are equal. + */ template inline bool equal(_InputIter1 __first1, _InputIter1 __last1, @@ -627,6 +770,20 @@ namespace std // lexicographical_compare and lexicographical_compare_3way. // (the latter is not part of the C++ standard.) + /** + * @brief Performs "dictionary" comparison on ranges. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @param last2 An input iterator. + * @return A boolean true or false. + * + * "Returns true if the sequence of elements defined by the range + * [first1,last1) is lexicographically less than the sequence of elements + * defined by the range [first2,last2). Returns false otherwise." + * (Quoted from [25.3.8]/1.) If the iterators are all character pointers, + * then this is an inline call to @c memcmp. + */ template bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, @@ -650,6 +807,18 @@ namespace std return __first1 == __last1 && __first2 != __last2; } + /** + * @brief Performs "dictionary" comparison on ranges. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @param last2 An input iterator. + * @param comp A @link s20_3_3_comparisons comparison functor@endlink. + * @return A boolean true or false. + * + * The same as the four-parameter @c lexigraphical_compare, but uses the + * comp parameter instead of @c <. + */ template bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, @@ -749,6 +918,20 @@ namespace std #endif } + /** + * @brief @c memcmp on steroids. + * @param first1 An input iterator. + * @param last1 An input iterator. + * @param first2 An input iterator. + * @param last2 An input iterator. + * @return An int, as with @c memcmp. + * + * The return value will be less than zero if the first range is + * "lexigraphically less than" the second, greater than zero if the second + * range is "lexigraphically less than" the first, and zero otherwise. + * This is an SGI extension. + * @ingroup SGIextensions + */ template int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, diff --git a/libstdc++-v3/include/ext/hash_map b/libstdc++-v3/include/ext/hash_map index cd26c57..228daba 100644 --- a/libstdc++-v3/include/ext/hash_map +++ b/libstdc++-v3/include/ext/hash_map @@ -53,8 +53,9 @@ * */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file hash_map + * This header file is an extension to the Standard C++ Library. You should + * use the "ext/" path prefix in your @c #include statements. */ #ifndef __SGI_STL_INTERNAL_HASH_MAP_H diff --git a/libstdc++-v3/include/ext/hash_set b/libstdc++-v3/include/ext/hash_set index 9ddef60..f5ff2f1 100644 --- a/libstdc++-v3/include/ext/hash_set +++ b/libstdc++-v3/include/ext/hash_set @@ -53,8 +53,9 @@ * */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file hash_set + * This header file is an extension to the Standard C++ Library. You should + * use the "ext/" path prefix in your @c #include statements. */ #ifndef __SGI_STL_INTERNAL_HASH_SET_H diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope index ca0d63d..78bb7dc 100644 --- a/libstdc++-v3/include/ext/rope +++ b/libstdc++-v3/include/ext/rope @@ -40,6 +40,11 @@ * purpose. It is provided "as is" without express or implied warranty. */ +/** @file rope + * This header file is an extension to the Standard C++ Library. You should + * use the "ext/" path prefix in your @c #include statements. + */ + #ifndef __SGI_STL_ROPE #define __SGI_STL_ROPE diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h index e36fedfa..b8f4568 100644 --- a/libstdc++-v3/include/ext/ropeimpl.h +++ b/libstdc++-v3/include/ext/ropeimpl.h @@ -40,13 +40,14 @@ * purpose. It is provided "as is" without express or implied warranty. */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file ropeimpl.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. */ #include #include -# include +#include namespace std { diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist index 7f1a628..7ed4c31 100644 --- a/libstdc++-v3/include/ext/slist +++ b/libstdc++-v3/include/ext/slist @@ -41,8 +41,9 @@ * */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file slist + * This header file is an extension to the Standard C++ Library. You should + * use the "ext/" path prefix in your @c #include statements. */ #ifndef __SGI_STL_INTERNAL_SLIST_H diff --git a/libstdc++-v3/include/ext/stl_hash_fun.h b/libstdc++-v3/include/ext/stl_hash_fun.h index 0ebfbbc..4dba329 100644 --- a/libstdc++-v3/include/ext/stl_hash_fun.h +++ b/libstdc++-v3/include/ext/stl_hash_fun.h @@ -53,8 +53,9 @@ * */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file stl_hash_fun.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. */ #ifndef _CPP_BITS_STL_HASH_FUN_H diff --git a/libstdc++-v3/include/ext/stl_hashtable.h b/libstdc++-v3/include/ext/stl_hashtable.h index 83e6ad6..1425bac 100644 --- a/libstdc++-v3/include/ext/stl_hashtable.h +++ b/libstdc++-v3/include/ext/stl_hashtable.h @@ -53,8 +53,9 @@ * */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file stl_hashtable.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. */ #ifndef __SGI_STL_INTERNAL_HASHTABLE_H diff --git a/libstdc++-v3/include/ext/stl_rope.h b/libstdc++-v3/include/ext/stl_rope.h index 96ec495..00db893 100644 --- a/libstdc++-v3/include/ext/stl_rope.h +++ b/libstdc++-v3/include/ext/stl_rope.h @@ -40,8 +40,9 @@ * purpose. It is provided "as is" without express or implied warranty. */ -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. +/** @file stl_rope.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. */ // rope<_CharT,_Alloc> is a sequence of _CharT. diff --git a/libstdc++-v3/libsupc++/eh_type.cc b/libstdc++-v3/libsupc++/eh_type.cc index ef9da9c..1c8afac 100644 --- a/libstdc++-v3/libsupc++/eh_type.cc +++ b/libstdc++-v3/libsupc++/eh_type.cc @@ -31,7 +31,8 @@ #include #include "unwind-cxx.h" -namespace __cxxabiv1 { +namespace __cxxabiv1 +{ // Returns the type_info for the currently handled exception [15.3/8], or // null if there is none. diff --git a/libstdc++-v3/libsupc++/exception b/libstdc++-v3/libsupc++/exception index 3463f3d..3e9fd96 100644 --- a/libstdc++-v3/libsupc++/exception +++ b/libstdc++-v3/libsupc++/exception @@ -95,7 +95,8 @@ namespace std bool uncaught_exception() throw(); } // namespace std -namespace __gnu_cxx { +namespace __gnu_cxx +{ /** A replacement for the standard terminate_handler which prints more information about the terminating exception (if any) on stderr. */ void verbose_terminate_handler (); diff --git a/libstdc++-v3/src/vterminate.cc b/libstdc++-v3/src/vterminate.cc index c84068a..a56db74 100644 --- a/libstdc++-v3/src/vterminate.cc +++ b/libstdc++-v3/src/vterminate.cc @@ -36,7 +36,8 @@ using namespace std; using namespace abi; -namespace __gnu_cxx { +namespace __gnu_cxx +{ /** This is a replacement for the standard terminate_handler which prints more information about the terminating exception (if any) on stderr. */ diff --git a/libstdc++-v3/testsuite/27_io/filebuf.cc b/libstdc++-v3/testsuite/27_io/filebuf.cc index d6f9ddb..5b7f086 100644 --- a/libstdc++-v3/testsuite/27_io/filebuf.cc +++ b/libstdc++-v3/testsuite/27_io/filebuf.cc @@ -19,12 +19,16 @@ // USA. // NB: this test assumes that _M_buf_size == 40, and not the usual -// buffer_size length of 8092, so that overflow/underflow can be +// buffer_size length of BUFSIZ (8192), so that overflow/underflow can be // simulated a bit more readily. +// NRB (Nota Really Bene): setting it to 40 breaks the test, as intended. // @require@ %-*.tst %-*.txt // @diff@ %-*.tst %*.txt +const int buffer_size = 8192; +//const int buffer_size = 40; + #include #include #include @@ -46,8 +50,6 @@ derived_filebuf fb_01; // in derived_filebuf fb_02; // out derived_filebuf fb_03; // in | out -const int buffer_size = 8192; - // initialize filebufs to be the same size regardless of platform void test00() -- 2.7.4