From: Jonathan Wakely Date: Fri, 7 Feb 2020 16:06:43 +0000 (+0000) Subject: libstdc++ Fix missing return in istream_view iterator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=572992c8920d5339a3ac28d442c436d6daa0bfae;p=gcc.git libstdc++ Fix missing return in istream_view iterator * include/std/ranges (iota_view): Add braces to prevent -Wempty-body warning. (basic_istream_view::_Iterator::operator++()): Add missing return. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 946897dda99..7c9a8a63ff9 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2020-02-07 Jonathan Wakely + + * 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 * include/bits/ranges_algo.h: Remove extraneous &&. diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index dd0c5cf6aa7..891ecf75eff 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -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