aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-requires36.C
blob: 8d3a4fcd2aa2b4c67e4f20802bdee5686aab187b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/111419
// { dg-do compile { target c++20 } }

template<class F>
concept invocable = requires(F& f) { f(); };

template<class F>
concept deref_invocable = requires(F& f) { *f(); };

struct Incomplete;

template<class T>
struct Holder { T t; };

static_assert(invocable<Holder<Incomplete>& ()>);
static_assert(deref_invocable<Holder<Incomplete>* ()>);