public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gcc-bugs at marehr dot dialup.fu-berlin.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94673] [concepts] What is the return type of local parameters of requires expressions? Date: Mon, 20 Apr 2020 17:43:34 +0000 [thread overview] Message-ID: <bug-94673-4-FD2SylInd0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94673-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94673 --- Comment #1 from gcc-bugs at marehr dot dialup.fu-berlin.de --- After playing with this a bit more, I found out that clang actually behaves differently: ```c++ #include <utility> #include <type_traits> template <typename t, typename u> concept same_as = std::is_same_v<t, u>; template <typename t> concept foo = requires(t v) { {v} -> same_as<t &>; }; // all of them work with gcc and msvc static_assert(foo<int>); // fails with clang static_assert(foo<int const>); // fails with clang static_assert(foo<int &&>); // fails with clang static_assert(foo<int &>); static_assert(foo<int const &>); ``` https://godbolt.org/z/MGpfZF I created an issue at https://bugs.llvm.org/show_bug.cgi?id=45622
next prev parent reply other threads:[~2020-04-20 17:43 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-20 17:18 [Bug c++/94673] New: " gcc-bugs at marehr dot dialup.fu-berlin.de 2020-04-20 17:43 ` gcc-bugs at marehr dot dialup.fu-berlin.de [this message] 2021-09-20 21:23 ` [Bug c++/94673] " arthur.j.odwyer at gmail dot com 2021-09-20 22:48 ` gcc-bugs at marehr dot dialup.fu-berlin.de 2021-09-21 17:48 ` ppalka at gcc dot gnu.org 2021-09-21 19:00 ` gcc-bugs at marehr dot dialup.fu-berlin.de
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-94673-4-FD2SylInd0@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).