Finish return statement handling

This commit is contained in:
Olivier Goffart 2021-01-25 15:31:34 +01:00
parent b22bbb1c0f
commit c2dc0cef2c
8 changed files with 158 additions and 50 deletions

View file

@ -209,6 +209,12 @@ vtable::Layout drop_in_place(ComponentRef component)
reinterpret_cast<T *>(component.instance)->~T();
return vtable::Layout { sizeof(T), alignof(T) };
}
template<typename T> struct ReturnWrapper {
ReturnWrapper(T val) : value(std::move(val)) {}
T value;
};
template<> struct ReturnWrapper<void> {};
} // namespace private_api
template<typename T>