comparison gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // { dg-do compile { target c++2a } }
2 // { dg-additional-options "-fconcepts-ts" }
3
4 template<class T> concept bool C1() { return false; }
5 template<C1 T> concept bool C2() { return true; } // { dg-error "cannot be constrained" }
6
7 void f(C2 x) {
8 }
9
10 struct A {} a;
11
12 int main() {
13 f(a);
14 }