summaryrefslogtreecommitdiff
path: root/system/include/libcxx/ios
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-08 19:57:52 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-08 19:57:52 -0700
commit5bc9fceed3002e0b24a3510f12779fc1243c4c07 (patch)
tree3ace3d12e614e27cece95fad1eef96bae0d52409 /system/include/libcxx/ios
parent6c275bebb45d6aac7e4a024b825ab34971b178d2 (diff)
parent32b77e92823f0cd6837b85f3c6208715fb0e757b (diff)
Merge pull request #1480 from waywardmonkeys/update-libcxx-part-20
Update libcxx
Diffstat (limited to 'system/include/libcxx/ios')
-rw-r--r--system/include/libcxx/ios27
1 files changed, 27 insertions, 0 deletions
diff --git a/system/include/libcxx/ios b/system/include/libcxx/ios
index 25bbfc0b..c10003d0 100644
--- a/system/include/libcxx/ios
+++ b/system/include/libcxx/ios
@@ -983,6 +983,33 @@ defaultfloat(ios_base& __str)
return __str;
}
+template <class _CharT, class _Traits>
+class __save_flags
+{
+ typedef basic_ios<_CharT, _Traits> __stream_type;
+ typedef typename __stream_type::fmtflags fmtflags;
+
+ __stream_type& __stream_;
+ fmtflags __fmtflags_;
+ _CharT __fill_;
+
+ __save_flags(const __save_flags&);
+ __save_flags& operator=(const __save_flags&);
+public:
+ _LIBCPP_INLINE_VISIBILITY
+ explicit __save_flags(__stream_type& __stream)
+ : __stream_(__stream),
+ __fmtflags_(__stream.flags()),
+ __fill_(__stream.fill())
+ {}
+ _LIBCPP_INLINE_VISIBILITY
+ ~__save_flags()
+ {
+ __stream_.flags(__fmtflags_);
+ __stream_.fill(__fill_);
+ }
+};
+
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_IOS