[Bug libstdc++/71579] type_traits miss checks for type completeness in some traits

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 1 22:00:19 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71579

--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The precondition for has_virtual_destructor is: "If T is a non-union class
type, T shall be a complete type." Our type trait and the
__has_virtual_destructor built-in both seem to get this wrong, rejecting
Incomplete[2], which is not a class type, and so doesn't need to be complete
(or maybe the precondition is wrong and there's a library defect?)


More information about the Gcc-bugs mailing list