public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
@ 2021-05-20 3:45 hewillk at gmail dot com
2021-05-20 14:31 ` [Bug libstdc++/100690] " ppalka at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hewillk at gmail dot com @ 2021-05-20 3:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
Bug ID: 100690
Summary: ranges::iota_view::_Sentinel cannot access _M_current
of _Iterator
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
Same access issue as PR100631:
https://godbolt.org/z/z4Ysc1cez
#include <ranges>
int main() {
int x[] = {42, 42, 42};
auto r = std::views::iota(std::ranges::begin(x), std::ranges::cbegin(x) + 3);
r.end() - r.begin();
r.begin() - r.end();
}
<source>:7:22: required from here
/opt/compiler-explorer/gcc-trunk-20210519/include/c++/12.0.0/ranges:518:22:
error: 'int* std::ranges::iota_view<int*, const int*>::_Iterator::_M_value' is
private within this context
518 | { return __x._M_value - __y._M_bound; }
| ~~~~^~~~~~~~
/opt/compiler-explorer/gcc-trunk-20210519/include/c++/12.0.0/ranges:490:15:
note: declared private here
490 | _Winc _M_value = _Winc();
| ^~~~~~~~
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/100690] ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
@ 2021-05-20 14:31 ` ppalka at gcc dot gnu.org
2021-05-21 3:39 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-05-20 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-05-20
CC| |ppalka at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/100690] ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
2021-05-20 14:31 ` [Bug libstdc++/100690] " ppalka at gcc dot gnu.org
@ 2021-05-21 3:39 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:22 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-21 3:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:317a38cd468d565dc8ce45c6da0dbccf38808f70
commit r12-958-g317a38cd468d565dc8ce45c6da0dbccf38808f70
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu May 20 23:39:05 2021 -0400
libstdc++: Fix access issue in iota_view::_Sentinel [PR100690]
libstdc++-v3/ChangeLog:
PR libstdc++/100690
* include/std/ranges (iota_view::_Sentinel::_M_distance_from):
Split out this member function from ...
(iota_view::_Sentinel::operator-): ... here, for sake of access
control.
* testsuite/std/ranges/iota/iota_view.cc (test05): New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/100690] ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
2021-05-20 14:31 ` [Bug libstdc++/100690] " ppalka at gcc dot gnu.org
2021-05-21 3:39 ` cvs-commit at gcc dot gnu.org
@ 2021-06-10 19:22 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:25 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:26 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-10 19:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:c6ccaf17ddbe8adb76475826be02580790ab28ca
commit r11-8545-gc6ccaf17ddbe8adb76475826be02580790ab28ca
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu May 20 23:39:05 2021 -0400
libstdc++: Fix access issue in iota_view::_Sentinel [PR100690]
libstdc++-v3/ChangeLog:
PR libstdc++/100690
* include/std/ranges (iota_view::_Sentinel::_M_distance_from):
Split out this member function from ...
(iota_view::_Sentinel::operator-): ... here, for sake of access
control.
* testsuite/std/ranges/iota/iota_view.cc (test05): New test.
(cherry picked from commit 317a38cd468d565dc8ce45c6da0dbccf38808f70)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/100690] ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
` (2 preceding siblings ...)
2021-06-10 19:22 ` cvs-commit at gcc dot gnu.org
@ 2021-06-10 19:25 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:26 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-10 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:8f5cda0e646822bbd01e642ed28a4f4f0cca8c59
commit r10-9907-g8f5cda0e646822bbd01e642ed28a4f4f0cca8c59
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu May 20 23:39:05 2021 -0400
libstdc++: Fix access issue in iota_view::_Sentinel [PR100690]
libstdc++-v3/ChangeLog:
PR libstdc++/100690
* include/std/ranges (iota_view::_Sentinel::_M_distance_from):
Split out this member function from ...
(iota_view::_Sentinel::operator-): ... here, for sake of access
control.
* testsuite/std/ranges/iota/iota_view.cc (test05): New test.
(cherry picked from commit 317a38cd468d565dc8ce45c6da0dbccf38808f70)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libstdc++/100690] ranges::iota_view::_Sentinel cannot access _M_current of _Iterator
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
` (3 preceding siblings ...)
2021-06-10 19:25 ` cvs-commit at gcc dot gnu.org
@ 2021-06-10 19:26 ` ppalka at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-06-10 19:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100690
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |10.4
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for 10.4/11.2/12
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-10 19:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 3:45 [Bug libstdc++/100690] New: ranges::iota_view::_Sentinel cannot access _M_current of _Iterator hewillk at gmail dot com
2021-05-20 14:31 ` [Bug libstdc++/100690] " ppalka at gcc dot gnu.org
2021-05-21 3:39 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:22 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:25 ` cvs-commit at gcc dot gnu.org
2021-06-10 19:26 ` ppalka at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).