[Bug c++/80144] New: Concept introduced with "template<OtherConcept T>" is not diagnosed
arthur.j.odwyer at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 22 03:24:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80144
Bug ID: 80144
Summary: Concept introduced with "template<OtherConcept T>" is
not diagnosed
Product: gcc
Version: c++-concepts
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: arthur.j.odwyer at gmail dot com
Target Milestone: ---
Compile this code with GCC trunk and -fconcepts:
template<typename T>
concept bool Never = requires(T t) {
{ t != 42 };
};
template<typename T> concept bool First = Never<T>;
template<Never T> concept bool Second = true;
int main()
{
static_assert(!Never<void*>);
static_assert(!First<void*>);
static_assert(!Second<void*>); // static assertion failed
}
I claim that the final static_assert should not fail, or else GCC should
diagnose some kind of syntax error in my concept definitions (perhaps the
syntax "Never T" is not intended to be supported).
More information about the Gcc-bugs
mailing list