[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / expression3.C
blob4148aa6511e3f125f5ba3ce031c12e75c27c2066
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4 concept bool C()
6   return requires (T& t) { t.~T(); };
9 class S1
11   ~S1() { }
14 class S2
16   ~S2() = delete;
19 int main()
21   static_assert(C<S1>(), ""); // { dg-error "failed" }
22   static_assert(C<S2>(), ""); // { dg-error "failed" }