[AArch64/arm] PR testsuite/85326 Avoid C++ tests when C++ compiler not present
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / partial-concept-id1.C
blob90a8ec72b2180110a467360b157975b928d169a1
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4   concept bool Type() { return true; }
6 template<typename T, typename U>
7   concept bool Same() { return __is_same_as(T, U); }
9 template<typename T, typename U>
10   concept bool C1() { return true; }
12 template<typename T, typename... Args>
13   concept bool C2() { return true; }
15 template<Same<int> T> struct S1 { };
16 template<typename T, Same<T> U> struct S2 { };
18 void f(Same<int> q) { }
19 void g(Type a, Same<decltype(a)> b) { }
21 void h0(Same<int>* a) { }
22 void h1(C1<int>* a) { }
23 void h2(C2<char, short, int, long>* a) { }
25 int main() {
26   S1<int> s1;
27   S2<int, int> s2;
28   f(0);
29   g(0, 1);
30   h0((int*)0);
31   h1((int*)0);
32   h2((int*)0);