Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/concepts/fn8.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 template<typename T> | 4 template<typename T> |
5 concept bool Class() { return __is_class(T); } | 5 concept bool Class() { return __is_class(T); } |
6 | 6 |
7 template<Class T> void f(T) { } | 7 template<Class T> void f(T) { } |
8 | 8 |
9 template<typename T> void fn(T) { } | 9 template<typename T> void fn(T) { } |
10 | 10 |
11 auto p1 = &f<int>; // { dg-error "no matches" } | 11 auto p1 = &f<int>; // { dg-error "" } |
12 void (*p2)(int) = &f<int>; // { dg-error "no matches" } | 12 void (*p2)(int) = &f<int>; // { dg-error "no matches" } |
13 void (*p3)(int) = &f; // { dg-error "no matches" } | 13 void (*p3)(int) = &f; // { dg-error "no matches" } |
14 | 14 |
15 struct S { | 15 struct S { |
16 template<Class T> int f(T) { return 0; } | 16 template<Class T> int f(T) { return 0; } |
17 }; | 17 }; |
18 | 18 |
19 auto p4 = &S::template f<int>; // { dg-error "no matches" } | 19 auto p4 = &S::template f<int>; // { dg-error "" } |
20 int (S::*p6)(int) = &S::template f<int>; // { dg-error "no matches" } | 20 int (S::*p6)(int) = &S::template f<int>; // { dg-error "no matches" } |
21 int (S::*p7)(int) = &S::f; // { dg-error "no matches" } | 21 int (S::*p7)(int) = &S::f; // { dg-error "no matches" } |
22 | 22 |
23 template<typename T> | 23 template<typename T> |
24 void g(T x) { } | 24 void g(T x) { } |