blob: 84d3b0f2ddb69450864354ef5d119218adb94cf3 [file] [log] [blame]
// PR c++/57388
// { dg-require-effective-target c++11 }
template<class> struct A
{
static constexpr bool value = false;
};
template<class Res, class... Args>
struct A<Res(Args...)>
{
static constexpr bool value = true;
};
template<class Res, class... Args>
struct A<Res(Args...) const &>
{
static constexpr bool value = true;
};
template<class Res, class... Args>
struct A<Res(Args...) const &&>
{
static constexpr bool value = true;
};
static_assert(A<void()>::value, "Ouch");
static_assert(A<void() const &>::value, ""); // #1
static_assert(A<void() const &&>::value, ""); // #2