// PR c++/67225 // { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts" } template concept Same = true; template struct WrapT {T t;}; template concept Destructible = requires(T t, const T ct, WrapT& wt) // { dg-message "in requirements" } { {wt.~WrapT()} noexcept; // {&t} -> Same; // #1 //{&t} -> T*; // #2 }; template void f() {} struct Y {private: ~Y();}; int main() { f(); // { dg-error "" } }