Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
rev | line source |
---|---|
145 | 1 // { dg-do compile { target c++2a } } |
2 // { dg-additional-options "-fconcepts-ts" } | |
3 | |
4 struct A { | |
5 template <class T> | |
6 double operator()(T x) const { | |
7 return 0; | |
8 } | |
9 }; | |
10 | |
11 template <class X> concept bool C() { | |
12 return requires { | |
13 &X::operator(); | |
14 }; | |
15 } | |
16 | |
17 int main() { | |
18 static_assert(C<A>()); | |
19 return 0; | |
20 } |