public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dangelog at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102396] [11/12 Regression] ICE when using concepts, in get, at cp/constraint.cc:2637 since r11-6245-g79f57d5cb070bb02 Date: Thu, 09 Dec 2021 18:54:21 +0000 [thread overview] Message-ID: <bug-102396-4-VIyZ9WPygg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102396-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102396 --- Comment #4 from Giuseppe D'Angelo <dangelog at gmail dot com> --- To elaborate on the last comment, this testcase does complain about the redefinition. #include <type_traits> #include <concepts> template <typename T> class S; template <typename T> static inline std::true_type is_S_impl(const S<T>&); static inline std::false_type is_S_impl(...); template <typename T> concept is_S = decltype(is_S_impl(std::declval<T>()))::value; template <typename T> struct S { using type = T; T data; S(); explicit S(const T &); template <typename V, typename U> requires is_S<V> && (!is_S<U>) && std::equality_comparable_with<typename V::type, U> friend bool operator==(const V &v, const U &u) { return v.data == u; } }; void f() { S<int> s1; s1 == 123; S<double> s2; s2 == 123.4; }
next prev parent reply other threads:[~2021-12-09 18:54 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-18 8:02 [Bug c++/102396] New: ICE when using concepts, in get, at cp/constraint.cc:2637 dangelog at gmail dot com 2021-09-27 12:51 ` [Bug c++/102396] [11/12 Regression] ICE when using concepts, in get, at cp/constraint.cc:2637 since r11-6245-g79f57d5cb070bb02 marxin at gcc dot gnu.org 2021-11-05 13:23 ` rguenth at gcc dot gnu.org 2021-11-05 14:01 ` ppalka at gcc dot gnu.org 2021-12-09 18:52 ` dangelog at gmail dot com 2021-12-09 18:54 ` dangelog at gmail dot com [this message] 2021-12-11 16:13 ` ppalka at gcc dot gnu.org 2021-12-13 16:58 ` dangelog at gmail dot com
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-102396-4-VIyZ9WPygg@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).