[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations

Zhihao Yuan via Phabricator reviews at reviews.llvm.org
Thu Nov 8 11:22:27 PST 2018


lichray accepted this revision.
lichray added inline comments.
This revision is now accepted and ready to land.
Herald added a subscriber: libcxx-commits.


================
Comment at: libcxx/include/istream:365
 __input_arithmetic(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
-    try
+    ios_base::iostate __state = ios_base::goodbit;
+    typename basic_istream<_CharT, _Traits>::sentry __s(__is);
----------------
I like `auto` just FYI :)


================
Comment at: libcxx/include/istream:1005
             default:
-                read(__s, _VSTD::min(__c, __n));
                 break;
----------------
LOL


Repository:
  rCXX libc++

https://reviews.llvm.org/D49863





More information about the libcxx-commits mailing list