我试图理解 C++ 中的工作原理std::is_polymorphc
。这是定义在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);
Run Code Online (Sandbox Code Playgroud)
我无法找到 的源代码__is_polymorphic
。有人可以帮助我了解如何__is_polymorphic
工作吗?