blob: 1513480bd8fc16b76b41efaf5de7cf65bf1569e4 [file] [log] [blame]
// { dg-options "-std=gnu++23" }
// { dg-do compile { target c++23 } }
#include <functional>
int f();
template<typename R>
concept can_invoke = requires (int (&f)()) { std::invoke_r<R>(f); };
static_assert( not can_invoke<const int&> );
static_assert( not can_invoke<int&&> );
static_assert( not can_invoke<const long&> );