C++的判断上当然要复杂一些:
template<typename T1, typename T2> struct is_same_type { operator bool() { return false; } }; template<typename T1> struct is_same_type<T1, T1> { operator bool() { return true; } };
2023-10-12 17:57:58
C++的判断上当然要复杂一些:
template<typename T1, typename T2> struct is_same_type { operator bool() { return false; } }; template<typename T1> struct is_same_type<T1, T1> { operator bool() { return true; } };