streambuf_iterator.h: Use noexcept per the FDIS.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 23 May 2011 23:03:42 +0000 (23:03 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 23 May 2011 23:03:42 +0000 (23:03 +0000)
2011-05-23  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/streambuf_iterator.h: Use noexcept per the FDIS.
(istreambuf_iterator<>::istreambuf_iterator(const
istreambuf_iterator&),  ~istreambuf_iterator()): Add defaulted
in C++0x mode.

From-SVN: r174094

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/streambuf_iterator.h

index 6332eaa090814678b44bd777ceb349af1d652cd5..76afc47d46fd1fd8fde26c0165276c087358ab1a 100644 (file)
@@ -1,3 +1,10 @@
+2011-05-23  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/streambuf_iterator.h: Use noexcept per the FDIS.
+       (istreambuf_iterator<>::istreambuf_iterator(const
+       istreambuf_iterator&),  ~istreambuf_iterator()): Add defaulted
+       in C++0x mode.
+
 2011-05-23  Jason Merrill  <jason@redhat.com>
 
        * libsupc++/exception_ptr.h: Fix compilation in C++0x mode.
index 83ae6785c2d069c50968ac47fc7d1ff7de91cedf..5540ca146b0d153cf344bdf7a15f897e378d47f8 100644 (file)
@@ -95,15 +95,21 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     public:
       ///  Construct end of input stream iterator.
-      _GLIBCXX_CONSTEXPR istreambuf_iterator() throw()
+      _GLIBCXX_CONSTEXPR istreambuf_iterator() _GLIBCXX_USE_NOEXCEPT
       : _M_sbuf(0), _M_c(traits_type::eof()) { }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
+
+      ~istreambuf_iterator() = default;
+#endif
+
       ///  Construct start of input stream iterator.
-      istreambuf_iterator(istream_type& __s) throw()
+      istreambuf_iterator(istream_type& __s) _GLIBCXX_USE_NOEXCEPT
       : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { }
 
       ///  Construct start of streambuf iterator.
-      istreambuf_iterator(streambuf_type* __s) throw()
+      istreambuf_iterator(streambuf_type* __s) _GLIBCXX_USE_NOEXCEPT
       : _M_sbuf(__s), _M_c(traits_type::eof()) { }
 
       ///  Return the current character pointed to by iterator.  This returns
@@ -228,11 +234,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
     public:
       ///  Construct output iterator from ostream.
-      ostreambuf_iterator(ostream_type& __s) throw ()
+      ostreambuf_iterator(ostream_type& __s) _GLIBCXX_USE_NOEXCEPT
       : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
 
       ///  Construct output iterator from streambuf.
-      ostreambuf_iterator(streambuf_type* __s) throw ()
+      ostreambuf_iterator(streambuf_type* __s) _GLIBCXX_USE_NOEXCEPT
       : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
 
       ///  Write character to streambuf.  Calls streambuf.sputc().
@@ -262,7 +268,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       /// Return true if previous operator=() failed.
       bool
-      failed() const throw()
+      failed() const _GLIBCXX_USE_NOEXCEPT
       { return _M_failed; }
 
       ostreambuf_iterator&