public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gawain.bolton at free dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/105351] [concepts] Constraint checking does correctly match static member attributes
Date: Sat, 23 Apr 2022 07:22:22 +0000 [thread overview]
Message-ID: <bug-105351-4-9LATucGAf9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105351-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105351
--- Comment #2 from Gawain Bolton <gawain.bolton at free dot fr> ---
Yes I believe this is a bug and strangely enough clang also seems to have this
issue.
>From the draft C++20 standard concerning "simple requirements" (cf.
https://isocpp.org/files/papers/N4860.pdf page 109):
A simple-requirement asserts the validity of an expression. [Note: The
enclosing requires-expression will evaluate to false if substitution of
template arguments into the expression fails. The expression is an unevaluated
operand (7.2). — end note] [Example:
template<typename T> concept C =
requires (T a, T b) {
a + b; // C<T> is true if a + b is a valid expression
};
— end example]
Clearly T::attr2 is not a valid expression for struct T { int attr2; }
next prev parent reply other threads:[~2022-04-23 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 20:29 [Bug c++/105351] New: " gawain.bolton at free dot fr
2022-04-22 20:44 ` [Bug c++/105351] " pinskia at gcc dot gnu.org
2022-04-23 7:22 ` gawain.bolton at free dot fr [this message]
2022-04-23 13:18 ` ensadc at mailnesia dot com
2022-05-01 20:02 ` gawain.bolton at free dot fr
2022-05-03 14:00 ` ppalka at gcc dot gnu.org
2022-05-03 14:24 ` ppalka at gcc dot gnu.org
2022-05-03 19:21 ` cvs-commit at gcc dot gnu.org
2023-04-18 13:38 ` 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-105351-4-9LATucGAf9@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: link
Be 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).