[Bug libstdc++/107313] New: typo in stride_view::_Iterator::operator-
hewillk at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Oct 19 03:13:46 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107313
Bug ID: 107313
Summary: typo in stride_view::_Iterator::operator-
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
std/ranges#L7877:
friend constexpr difference_type
operator-(default_sentinel_t __y, const _Iterator& __x)
requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<_Base>>
{ return __detail::__div_ceil(__x._M_end, __x._M_current, __x._M_stride); }
The ',' should be '-'.
testcase:
#include <iostream>
#include <ranges>
int main() {
auto i = std::views::istream<int>(std::cin);
auto r = std::views::counted(i.begin(), 4)
| std::views::stride(2);
auto d = r.begin() - r.end();
}
More information about the Gcc-bugs
mailing list