public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "nickhuang99 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102925] [11.2]ICE with concept of std::convertible_to with lambda in unevaluated-context Date: Mon, 25 Oct 2021 15:12:42 +0000 [thread overview] Message-ID: <bug-102925-4-KtNbcpPMfX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102925-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102925 --- Comment #2 from qingzhe huang <nickhuang99 at hotmail dot com> --- I suspect this is related to template-specialization-related issue because if I use original implementation of "std::convertible_to" to declare my concept (https://en.cppreference.com/w/cpp/concepts/convertible_to), template <class From, class To> concept convertible_to = std::is_convertible_v<From, To> && requires { static_cast<To>(std::declval<From>()); }; then it works. (https://www.godbolt.org/z/99eoToze3) See this concept is not a specialization of concept "std::convertible_to" template<class T> concept IsLambda=std::is_convertible_v<T,decltype(+[]{})> && requires{ static_cast<decltype(+[]{})>(std::declval<T>()); };
next prev parent reply other threads:[~2021-10-25 15:12 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-25 10:11 [Bug c++/102925] New: " nickhuang99 at hotmail dot com 2021-10-25 12:40 ` [Bug c++/102925] " pinskia at gcc dot gnu.org 2021-10-25 15:12 ` nickhuang99 at hotmail dot com [this message] 2024-04-13 7:58 ` pinskia 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-102925-4-KtNbcpPMfX@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).