mirror of git://gcc.gnu.org/git/gcc.git
24 lines
298 B
C
24 lines
298 B
C
// { dg-options "-std=c++1z" }
|
|
|
|
template<typename T>
|
|
concept bool C()
|
|
{
|
|
return requires (T& t) { t.~T(); };
|
|
}
|
|
|
|
class S1
|
|
{
|
|
~S1() { }
|
|
};
|
|
|
|
class S2
|
|
{
|
|
~S2() = delete;
|
|
};
|
|
|
|
int main()
|
|
{
|
|
static_assert(C<S1>(), ""); // { dg-error "failed" }
|
|
static_assert(C<S2>(), ""); // { dg-error "failed" }
|
|
}
|