https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107600
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:0629924777ea20d56d9ea40c3915eb0327a22ac7 commit r16-944-g0629924777ea20d56d9ea40c3915eb0327a22ac7 Author: Jason Merrill <ja...@redhat.com> Date: Wed May 28 11:42:00 2025 -0400 c++: add __is_*destructible builtins [PR107600] Typically "does this class have a trivial destructor" is the wrong question to ask, we rather want "can I destroy this class trivially", thus the std::is_trivially_destructible standard trait. Let's provide a builtin for it, and complain about asking whether a deleted destructor is trivial. Clang and MSVC also have these traits. PR c++/107600 gcc/cp/ChangeLog: * cp-trait.def (IS_DESTRUCTIBLE, IS_NOTHROW_DESTRUCTIBLE) (IS_TRIVIALLY_DESTRUCTIBLE): New. * constraint.cc (diagnose_trait_expr): Explain them. * method.cc (destructible_expr): New. (is_xible_helper): Use it. * semantics.cc (finish_trait_expr): Handle new traits. (trait_expr_value): Likewise. Complain about asking whether a deleted dtor is trivial. gcc/testsuite/ChangeLog: * g++.dg/ext/is_destructible1.C: New test.