This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/80144] Concept introduced with "template<OtherConcept T>" is not diagnosed
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 17:05:33 +0000
- Subject: [Bug c++/80144] Concept introduced with "template<OtherConcept T>" is not diagnosed
- Auto-submitted: auto-generated
- References: <bug-80144-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80144
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-21
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Arthur O'Dwyer from comment #0)
> 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).
Confirmed, although I'm not sure which of those 2 options is correct...