Skip to content

Create storage in caller for by-value non-trivial arguments - #694

Merged
nunoplopes merged 15 commits into
Cpp2Rust:masterfrom
lucic71:by-value-args-in-caller-storage
Dec 2, 2026
Merged

nunoplopes merged 15 commits into
Cpp2Rust:masterfrom
lucic71:by-value-args-in-caller-storage

Conversation

@lucic71

@lucic71 lucic71 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

For non-trivial by-value arguments, create the storage in the caller and pass a Ptr<T> insted of T to the function. Trivial by-value arguments continue to pass T.

Pass a Ptr<T> instead of Value<T> to the callee so that the caller continues having ownership. This is important later when we fix the destructor calls.

@nunoplopes
nunoplopes merged commit a554a35 into Cpp2Rust:master Dec 2, 2026
5 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants