public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103831] views::lazy_split accepts Pattern as span<int, 1> when V is input_range Date: Sun, 26 Dec 2021 15:41:54 +0000 [thread overview] Message-ID: <bug-103831-4-ELJT2wkw6R@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103831-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103831 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Last reconfirmed| |2021-12-26 CC| |ppalka at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> --- Interestingly, adding the (correct and passing) assert static_assert(!std::ranges::__detail::__tiny_range<decltype(p)>); before the last line causes us to reject the last line with /home/patrick/code/gcc/libstdc++-v3/include/std/ranges:2953:12: error: satisfaction value of atomic constraint ‘requires{std::ranges::__detail::__require_constant<(std::remove_reference<_Tp>::type::size)()>;} [with _Range = std::span<int, 1>]’ changed from ‘false’ to ‘true’ Looks like this is indeed a frontend bug, which can be distilled into the testcase struct A { constexpr int size() { return 42; } }; template<class T> struct B : T { static_assert(A::size() == 42); }; We incorrectly accept the non-dependent call A::size() here even though it's being performed from a context where there is no 'this' object.
next prev parent reply other threads:[~2021-12-26 15:41 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-26 11:33 [Bug libstdc++/103831] New: " hewillk at gmail dot com 2021-12-26 15:41 ` ppalka at gcc dot gnu.org [this message] 2021-12-26 16:21 ` [Bug c++/103831] non-dependent call to non-static member function not rejected ahead of time when there are dependent bases and no 'this' hewillk at gmail dot com 2022-01-11 18:00 ` cvs-commit at gcc dot gnu.org 2022-01-12 17:03 ` cvs-commit at gcc dot gnu.org 2022-01-12 17:25 ` ppalka at gcc dot gnu.org 2022-01-12 17:26 ` ppalka at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103831-4-ELJT2wkw6R@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).