[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-17 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 Patrick Palka changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:04cb64dadb5c115b4ad093ff92c3f5a0a87ef15f commit r10-9036-g04cb64dadb5c115b4ad093ff92c3f5a0a87ef15f Author: Patrick Palka

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #8 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:8661f4faa875f361cd22a197774c1fa04cd0580b commit r11-5096-g8661f4faa875f361cd22a197774c1fa04cd0580b Author: Patrick Palka Date:

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #7 from Patrick Palka --- Patch posted at https://gcc.gnu.org/pipermail/libstdc++/2020-November/051458.html

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 Patrick Palka changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #5 from Jonathan Wakely --- Also, don't paste copyrighted code into talk pages on cppreference.

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #4 from Jonathan Wakely --- (In reply to Alexey Mission from comment #3) > Please see also cppreference.com where this bug is also spotted: > https://en.cppreference.com/w/Talk:cpp/algorithm/ranges/search_n Reporting bugs in a talk

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread space.mission at yandex dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 Alexey Mission changed: What|Removed |Added CC||space.mission at yandex dot ru ---

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread ensadc at mailnesia dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #2 from ensadc at mailnesia dot com --- This seems to fix the bug (note: not thoroughly tested) diff --git a/libstdc++-v3/include/bits/ranges_algo.h b/libstdc++-v3/include/bits/ranges_algo.h index f1a4cc24c0d..414ce0b1baa 100644 ---

[Bug libstdc++/97828] std::ranges::search_n does not work with counted_iterator<_List_iterator<...>>

2020-11-16 Thread ensadc at mailnesia dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97828 --- Comment #1 from ensadc at mailnesia dot com --- Compilation failure with `std::list`: https://godbolt.org/z/vbqhax Wrong result with `std::vector`: https://godbolt.org/z/axYbYr (expected output: "42 42 42"; actual: "42 0 42") It appears