This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/67719] New: [concepts] bug with concepts using logical or
- From: "ryan.burn at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Sep 2015 00:18:26 +0000
- Subject: [Bug c++/67719] New: [concepts] bug with concepts using logical or
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67719
Bug ID: 67719
Summary: [concepts] bug with concepts using logical or
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 fails to compile but should.
It gives the following error:
main.cpp: In function âint main()â:
main.cpp:11:15: error: template constraint failure
Ax<int, long> a;
^
main.cpp:11:15: note: constraints not satisfied
main.cpp:11:15: note: in the expansion of â(C<Tx>)()...â
/////////////////////////////////////////////////////////////////////
#include <type_traits>
template<class X> concept bool C() {
return std::is_same<X, int>::value || std::is_same<X, long>::value;
}
template<C... Tx>
struct Ax {};
int main() {
Ax<int, long> a;
return 0;
}
/////////////////////////////////////////////////////////////////////