summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/ios_base.h
diff options
context:
space:
mode:
authorRĂ¼diger Sonderfeld <ruediger@c-plusplus.de>2014-10-06 15:55:53 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2014-10-06 16:55:53 +0100
commitc4b64f5bcac6f7d5e1ae7d3026a3e228fb8adbbd (patch)
treea073e4aa7ba9c60171d422fb14bfd20fb5535571 /libstdc++-v3/include/bits/ios_base.h
parentcec5d8be5591842084cf656b2ef900ff85089aae (diff)
downloadgcc-c4b64f5bcac6f7d5e1ae7d3026a3e228fb8adbbd.tar.gz
re PR libstdc++/59987 ([C++11]: Missing ios_base::hexfloat format specifier)
2014-10-06 RĂ¼diger Sonderfeld <ruediger@c-plusplus.de> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/59987 * doc/xml/manual/status_cxx2011.xml: Remove hexfloat from notes. * doc/html/manual/status.html: Regenerate. * include/bits/ios_base.h (hexfloat): New function. (defaultfloat): New function. * src/c++98/locale_facets.cc (__num_base::_S_format_float): Support hexadecimal floating point format. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc: New file. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r215952
Diffstat (limited to 'libstdc++-v3/include/bits/ios_base.h')
-rw-r--r--libstdc++-v3/include/bits/ios_base.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index fb448fd1091..5e33b812fe3 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -984,6 +984,27 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __base;
}
+#if __cplusplus >= 201103L
+ // New C++11 floatfield manipulators
+
+ /// Calls
+ /// base.setf(ios_base::fixed|ios_base::scientific, ios_base::floatfield)
+ inline ios_base&
+ hexfloat(ios_base& __base)
+ {
+ __base.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield);
+ return __base;
+ }
+
+ /// Calls @c base.unsetf(ios_base::floatfield)
+ inline ios_base&
+ defaultfloat(ios_base& __base)
+ {
+ __base.unsetf(ios_base::floatfield);
+ return __base;
+ }
+#endif
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace