public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/101231] New: _CachedPosition::_M_get() should not return {} when range adapter does not model forward_range
@ 2021-06-27  8:15 hewillk at gmail dot com
  2021-06-28 15:04 ` [Bug libstdc++/101231] " ppalka at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hewillk at gmail dot com @ 2021-06-27  8:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101231

            Bug ID: 101231
           Summary: _CachedPosition::_M_get() should not return {} when
                    range adapter does not model forward_range
           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: ---

After P2325, iterators such as basic_istream_view::iterator are no longer
default_initializable, so _CachedPosition::_M_get() should not just return {}
when the adapter does not model forward_range.

#include <ranges>
#include <sstream>

int main() {
  auto words = std::istringstream{"42"};
  auto is = std::ranges::istream_view<int>(words);
  auto r = is | std::views::filter([](auto) { return true; });
  for (auto x : r);
}


https://godbolt.org/z/PejdYzc8j

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-31 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27  8:15 [Bug libstdc++/101231] New: _CachedPosition::_M_get() should not return {} when range adapter does not model forward_range hewillk at gmail dot com
2021-06-28 15:04 ` [Bug libstdc++/101231] " ppalka at gcc dot gnu.org
2021-07-16 13:47 ` cvs-commit at gcc dot gnu.org
2021-07-16 13:53 ` ppalka at gcc dot gnu.org
2022-02-11 14:04 ` cvs-commit at gcc dot gnu.org
2022-05-31 18:39 ` cvs-commit at gcc dot gnu.org
2022-05-31 18:46 ` 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).