41 static void inspectVTable(T *obj,
size_t max_slots = 64) {
42 static_assert(std::is_polymorphic_v<T>);
43 assert(obj !=
nullptr);
46 std::memcpy(&raw, obj,
sizeof(raw));
49 std::cout <<
"\031[31m[ERROR]: unable to copy terminating inspectVTable\031[0m\n";
53 void** vtable =
reinterpret_cast<void**
>(raw);
55 for(
size_t i = 0; i < max_slots; i++) {
56 if (vtable[i] ==
nullptr)
58 std::cout<<
"["<<i<<
"]"<<vtable[i]<<std::endl;
Definition BitCaster.hpp:5