[cfe-commits] [libcxx] r160565 - in /libcxx/trunk: include/iterator test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp

Howard Hinnant hhinnant at apple.com
Fri Jul 20 12:36:34 PDT 2012


Author: hhinnant
Date: Fri Jul 20 14:36:34 2012
New Revision: 160565

URL: http://llvm.org/viewvc/llvm-project?rev=160565&view=rev
Log:
noexcept applied to <iterator>.

Modified:
    libcxx/trunk/include/iterator
    libcxx/trunk/test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp

Modified: libcxx/trunk/include/iterator
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=160565&r1=160564&r2=160565&view=diff
==============================================================================
--- libcxx/trunk/include/iterator (original)
+++ libcxx/trunk/include/iterator Fri Jul 20 14:36:34 2012
@@ -263,10 +263,10 @@
     typedef basic_streambuf<charT,traits> streambuf_type;
     typedef basic_istream<charT,traits>   istream_type;
 
-    istreambuf_iterator() throw();
-    istreambuf_iterator(istream_type& s) throw();
-    istreambuf_iterator(streambuf_type* s) throw();
-    istreambuf_iterator(a-private-type) throw();
+    istreambuf_iterator() noexcept;
+    istreambuf_iterator(istream_type& s) noexcept;
+    istreambuf_iterator(streambuf_type* s) noexcept;
+    istreambuf_iterator(a-private-type) noexcept;
 
     charT                operator*() const;
     pointer operator->() const;
@@ -293,13 +293,13 @@
     typedef basic_streambuf<charT,traits> streambuf_type;
     typedef basic_ostream<charT,traits>   ostream_type;
 
-    ostreambuf_iterator(ostream_type& s) throw();
-    ostreambuf_iterator(streambuf_type* s) throw();
+    ostreambuf_iterator(ostream_type& s) noexcept;
+    ostreambuf_iterator(streambuf_type* s) noexcept;
     ostreambuf_iterator& operator=(charT c);
     ostreambuf_iterator& operator*();
     ostreambuf_iterator& operator++();
     ostreambuf_iterator& operator++(int);
-    bool failed() const throw();
+    bool failed() const noexcept;
 };
 
 template <class C> auto begin(C& c) -> decltype(c.begin());
@@ -815,12 +815,12 @@
             __sbuf_ = 0;
     }
 public:
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator() throw() : __sbuf_(0) {}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) throw()
+    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {}
+    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
         : __sbuf_(__s.rdbuf()) {__test_for_eof();}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) throw()
+    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
         : __sbuf_(__s) {__test_for_eof();}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) throw()
+    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
         : __sbuf_(__p.__sbuf_) {}
 
     _LIBCPP_INLINE_VISIBILITY char_type  operator*() const
@@ -867,9 +867,9 @@
 private:
     streambuf_type* __sbuf_;
 public:
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) throw()
+    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) _NOEXCEPT
         : __sbuf_(__s.rdbuf()) {}
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) throw()
+    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT
         : __sbuf_(__s) {}
     _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c)
         {
@@ -880,7 +880,7 @@
     _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
     _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
     _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;}
-    _LIBCPP_INLINE_VISIBILITY bool failed() const throw() {return __sbuf_ == 0;}
+    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;}
 };
 
 template <class _Iter>

Modified: libcxx/trunk/test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp?rev=160565&r1=160564&r2=160565&view=diff
==============================================================================
--- libcxx/trunk/test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp (original)
+++ libcxx/trunk/test/iterators/predef.iterators/insert.iterators/insert.iterator/types.pass.cpp Fri Jul 20 14:36:34 2012
@@ -38,7 +38,7 @@
     void test()
     {
         this->container = 0;
-        this->iter == this->iter;
+        (void)(this->iter == this->iter);
     }
 };
 





More information about the cfe-commits mailing list