浏览代码

Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171232 91177308-0d34-0410-b5e6-96231b3b80d8
Howard Hinnant 12 年之前
父节点
当前提交
d1a7479763
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      include/iterator

+ 2 - 2
include/iterator

@@ -822,9 +822,9 @@ private:
 public:
 public:
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
     _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
-        : __sbuf_(__s.rdbuf()) {__test_for_eof();}
+        : __sbuf_(__s.rdbuf()) {}
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
-        : __sbuf_(__s) {__test_for_eof();}
+        : __sbuf_(__s) {}
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
     _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
         : __sbuf_(__p.__sbuf_) {}
         : __sbuf_(__p.__sbuf_) {}