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.