blob: 676468112843ced0d703fbd3bd6d3778c7fff2cf [file] [log] [blame]
// { dg-do compile { target c++17_only } }
// { dg-options "-fconcepts" }
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" }
}