Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function make_unique[T, Args:...Types]
- (
- cons:ref (...Args, out T):unit,
- args:Args...
- ):unique_ptr[T]{
- let node = malloc[T]();
- cons(...args, node as &out);
- return unique_ptr[T]{node=node};
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement