#pragma once #include namespace il2cpp { namespace utils { namespace TemplateUtils { template struct IsSame { static const bool value = false; }; template struct IsSame { static const bool value = true; }; template struct IsBaseOf { private: template struct Converter { operator BT*() const; operator DT*(); }; typedef int16_t Derived; typedef int8_t NotDerived; template static Derived IsDerived(D*, T); static NotDerived IsDerived(B*, int); public: static const bool value = IsSame::value || sizeof(IsDerived(Converter(), int())) == sizeof(Derived); }; } } }