mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Finish return statement handling
This commit is contained in:
parent
b22bbb1c0f
commit
c2dc0cef2c
8 changed files with 158 additions and 50 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue