libstdc++ Fix missing return in istream_view iterator
authorJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 16:06:43 +0000 (16:06 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 16:06:43 +0000 (16:06 +0000)
* include/std/ranges (iota_view): Add braces to prevent -Wempty-body
warning.
(basic_istream_view::_Iterator::operator++()): Add missing return.

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/ranges

index 946897dda99a8c86ac6ffbf57fb1b7c0d2db205c..7c9a8a63ff9327d6eb28f817f01d4a5aa6905e27 100644 (file)
@@ -1,3 +1,9 @@
+2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
+       warning.
+       (basic_istream_view::_Iterator::operator++()): Add missing return.
+
 2020-02-07  Patrick Palka  <ppalka@redhat.com>
 
        * include/bits/ranges_algo.h: Remove extraneous &&.
index dd0c5cf6aa75fc7c84176509f4c9df264a7d388e..891ecf75eff9a92bd931716b771d2fd5e169060c 100644 (file)
@@ -872,7 +872,9 @@ namespace ranges
       : _M_value(__value), _M_bound(__bound)
       {
        if constexpr (totally_ordered_with<_Winc, _Bound>)
-         __glibcxx_assert( bool(__value <= __bound) );
+         {
+           __glibcxx_assert( bool(__value <= __bound) );
+         }
       }
 
       constexpr _Iterator
@@ -1012,6 +1014,7 @@ namespace views
        {
          __glibcxx_assert(_M_parent->_M_stream != nullptr);
          *_M_parent->_M_stream >> _M_parent->_M_object;
+         return *this;
        }
 
        void