gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C
raw| 1 | // { dg-do compile { target c++20 } } |
| 2 | // { dg-additional-options "-fconcepts" } |
| 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 C = |
| 12 | requires { |
| 13 | &X::operator(); |
| 14 | }; |
| 15 | |
| 16 | int main() { |
| 17 | static_assert(!C<A>); |
| 18 | return 0; |
| 19 | } |