...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
template <class T> struct has_virtual_destructor : public
Inherits: If T is a (possibly cv-qualified) type with a virtual destructor then inherits from true_type, otherwise inherits from false_type.
Compiler Compatibility: There is currently
no way to portably implement this trait: the default version always inherits
and has to be explicitly specialized for types with virtual destructors unless
the compiler used has compiler intrinsics
that enable the trait to do the right thing: Currently (June 2015) compilers
more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0, Intel-11.0, plus
Codegear and Clang have the necessary compiler intrinsics
to ensure that this trait "just works". You may also test to see
if the necessary intrinsics
are available by checking to see if the macro
C++ Standard Reference: 12.4.