Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/fn5.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // { dg-do compile { target c++17 } } | 1 // { dg-do compile { target c++17_only } } |
2 // { dg-options "-fconcepts" } | 2 // { dg-options "-fconcepts" } |
3 | 3 |
4 // Check shorthand notation. | 4 // Check shorthand notation. |
5 | 5 |
6 template<typename T> | 6 template<typename T> |
17 | 17 |
18 int main() { | 18 int main() { |
19 S1<char> s1; // { dg-error "constraint|invalid" } | 19 S1<char> s1; // { dg-error "constraint|invalid" } |
20 S2<int, char> s2; // { dg-error "constraint|invalid" } | 20 S2<int, char> s2; // { dg-error "constraint|invalid" } |
21 | 21 |
22 f('a'); // { dg-error "cannot" } | 22 f('a'); // { dg-error "unsatisfied" } |
23 g(0, 'a'); // { dg-error "cannot" } | 23 g(0, 'a'); // { dg-error "unsatisfied" } |
24 } | 24 } |