std::has_virtual_destructor (3) - Linux Man Pages
Defined in header <type_traits>
template< class T > (since C++11)
If T is a type with a virtual destructor, provides the member constant value equal true. For any other type, value is false.
If T is a non-union class type, T shall be a complete type; otherwise, the behavior is undefined.
Helper variable template
template< class T > (since C++17)
inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<T>::value;
Inherited from std::integral_constant
value true if T has a virtual destructor , false otherwise
operator bool (public member function)
operator() returns value
type std::integral_constant<bool, value>
If a class has a public virtual destructor, it can be derived from, and the derived object can be safely deleted through a pointer to the base object (GotW_#18)
// Run this code
is_nothrow_destructible checks if a type has a non-deleted destructor