public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67658] New: [concepts] invalid code with constrained concepts compiles
@ 2015-09-20 20:40 ryan.burn at gmail dot com
0 siblings, 0 replies; only message in thread
From: ryan.burn at gmail dot com @ 2015-09-20 20:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67658
Bug ID: 67658
Summary: [concepts] invalid code with constrained concepts
compiles
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ryan.burn at gmail dot com
Target Milestone: ---
This code compiles with gcc
g++ (GCC) 6.0.0 20150915 (experimental)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//////////////////////////////////////////////////////
template<class T> concept bool C1() { return false; }
template<C1 T> concept bool C2() { return true; }
void f(C2 x) {
}
struct A {} a;
int main() {
f(a);
}
//////////////////////////////////////////////////////
>From page 17 example 6.3 of N4377
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4377.pdf), it looks
like constrained concepts are not allowed. And even if they were, the
constraints on concept C2 should not be satisfied.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-20 20:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 20:40 [Bug c++/67658] New: [concepts] invalid code with constrained concepts compiles ryan.burn at gmail dot com
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).