I tried to understand the working of std::is_polymorphc in C++.
This is defined in type_traits.h:
template <class _Ty>
struct is_polymorphic : bool_constant<__is_polymorphic(_Ty)> {}; // determine whether _Ty is a polymorphic type
template <class _Ty>
_INLINE_VAR constexpr bool is_polymorphic_v = __is_polymorphic(_Ty);
I am not able to find the source code for __is_polymorphic.
Could someone help me understand how __is_polymorphic works ?