diff options
author | Alexander Kabaev <kan@FreeBSD.org> | 2003-07-11 03:42:04 +0000 |
---|---|---|
committer | Alexander Kabaev <kan@FreeBSD.org> | 2003-07-11 03:42:04 +0000 |
commit | 1b86b14eacf30b52bd5b9e48116db15982432eda (patch) | |
tree | ce14546aca3a67fa3440aed52f132bafaf68fe70 /contrib/libstdc++/include/std/std_iomanip.h | |
parent | bd0df3aa27aac083bd60b649fa5347076a5126eb (diff) |
Gcc 3.3.1-pre 2003-07-11 C++ support bits.
Notes
Notes:
svn path=/vendor/gcc/dist/; revision=117397
Diffstat (limited to 'contrib/libstdc++/include/std/std_iomanip.h')
-rw-r--r-- | contrib/libstdc++/include/std/std_iomanip.h | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/contrib/libstdc++/include/std/std_iomanip.h b/contrib/libstdc++/include/std/std_iomanip.h index 23237ce210d6..490d5ac1cfba 100644 --- a/contrib/libstdc++/include/std/std_iomanip.h +++ b/contrib/libstdc++/include/std/std_iomanip.h @@ -1,6 +1,7 @@ // Standard stream manipulators -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003 +// 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 @@ -47,8 +48,18 @@ namespace std { + // [27.6.3] standard manipulators + // Also see DR 183. + struct _Resetiosflags { ios_base::fmtflags _M_mask; }; + /** + * @brief Manipulator for @c setf. + * @param mask A format flags mask. + * + * Sent to a stream object, this manipulator resets the specified flags, + * via @e stream.setf(0,mask). + */ inline _Resetiosflags resetiosflags(ios_base::fmtflags __mask) { @@ -76,6 +87,13 @@ namespace std struct _Setiosflags { ios_base::fmtflags _M_mask; }; + /** + * @brief Manipulator for @c setf. + * @param mask A format flags mask. + * + * Sent to a stream object, this manipulator sets the format flags + * to @a mask. + */ inline _Setiosflags setiosflags(ios_base::fmtflags __mask) { @@ -103,6 +121,14 @@ namespace std struct _Setbase { int _M_base; }; + /** + * @brief Manipulator for @c setf. + * @param base A numeric base. + * + * Sent to a stream object, this manipulator changes the + * @c ios_base::basefield flags to @c oct, @c dec, or @c hex when @a base + * is 8, 10, or 16, accordingly, and to 0 if @a base is any other value. + */ inline _Setbase setbase(int __base) { @@ -137,6 +163,13 @@ namespace std template<typename _CharT> struct _Setfill { _CharT _M_c; }; + /** + * @brief Manipulator for @c fill. + * @param c The new fill character. + * + * Sent to a stream object, this manipulator calls @c fill(c) for that + * object. + */ template<typename _CharT> inline _Setfill<_CharT> setfill(_CharT __c) @@ -165,6 +198,13 @@ namespace std struct _Setprecision { int _M_n; }; + /** + * @brief Manipulator for @c precision. + * @param n The new precision. + * + * Sent to a stream object, this manipulator calls @c precision(n) for + * that object. + */ inline _Setprecision setprecision(int __n) { @@ -192,6 +232,13 @@ namespace std struct _Setw { int _M_n; }; + /** + * @brief Manipulator for @c width. + * @param n The new width. + * + * Sent to a stream object, this manipulator calls @c width(n) for + * that object. + */ inline _Setw setw(int __n) { @@ -219,6 +266,7 @@ namespace std // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. +#if _GLIBCPP_EXTERN_TEMPLATE extern template ostream& operator<<(ostream&, _Setfill<char>); extern template ostream& operator<<(ostream&, _Setiosflags); extern template ostream& operator<<(ostream&, _Resetiosflags); @@ -246,6 +294,7 @@ namespace std extern template wistream& operator>>(wistream&, _Setprecision); extern template wistream& operator>>(wistream&, _Setw); #endif +#endif } // namespace std #endif |