blob: c56a5d4198cf29cdebc76810a601fda558c828f0 [file] [log] [blame]
// PR c++/48530
// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T{})
>
char f(int);
template<class>
char (&f(...))[2];
struct DelDtor {
~DelDtor() = delete;
};
static_assert(sizeof(f<DelDtor[2]>(0)) != 1, "Error");
struct A
{
static DelDtor *p;
};
template<class T,
class = decltype(delete T::p, (T*)0)
>
char g(int);
template<class>
char (&g(...))[2];
static_assert(sizeof(g<DelDtor>(0)) != 1, "Error");