public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/115046] New: meta-recursion when apply join_view with as_const_view
@ 2024-05-12  5:10 hewillk at gmail dot com
  2024-05-12  5:13 ` [Bug libstdc++/115046] " hewillk at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hewillk at gmail dot com @ 2024-05-12  5:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115046
           Summary: meta-recursion when apply join_view with as_const_view
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

I seriously doubt this is a more practical example of LWG 3986 since join_view
has a std::optional member to store the iterator, but I'm not sure about
whether this is a language bug or a library bug since MSVC doesn't have the
issue:


#include <ranges>
#include <list>

int main() {
  std::list<std::string_view> l;
  auto r = l | std::views::chunk(3)
             | std::views::transform(std::views::as_const)
             | std::views::join;
  for (auto&& elem : r) {
    // infinite meta-recursion
  }
}

https://godbolt.org/z/Morx4voT8

Reduction is a nightmare, so I only do it when I have time.

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

* [Bug libstdc++/115046] meta-recursion when apply join_view with as_const_view
  2024-05-12  5:10 [Bug libstdc++/115046] New: meta-recursion when apply join_view with as_const_view hewillk at gmail dot com
@ 2024-05-12  5:13 ` hewillk at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: hewillk at gmail dot com @ 2024-05-12  5:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
Oh, maybe this is just because MSVC does not use std::optional but uses
_Defaultabox.

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

end of thread, other threads:[~2024-05-12  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-12  5:10 [Bug libstdc++/115046] New: meta-recursion when apply join_view with as_const_view hewillk at gmail dot com
2024-05-12  5:13 ` [Bug libstdc++/115046] " hewillk at gmail dot com

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).