Add a dummy indirection in C++ for the item vtable access

This will allow for a compile-time decision in the future whether
to use the vtable symbol or getter function.
This commit is contained in:
Simon Hausmann 2021-05-10 17:20:54 +02:00 committed by Simon Hausmann
parent c84e6d2945
commit 4198513832
3 changed files with 33 additions and 16 deletions

View file

@ -204,6 +204,12 @@ inline vtable::Layout drop_in_place(ComponentRef component)
return vtable::Layout { sizeof(T), alignof(T) };
}
template<typename VTableType>
constexpr inline const VTableType *get_vtable(const VTableType *vtable_symbol)
{
return vtable_symbol;
}
template<typename T>
struct ReturnWrapper
{