Skip to content

Translate classes with mutable fields - #387

Merged
nunoplopes merged 1 commit into
Cpp2Rust:masterfrom
lucic71:mutable
Sep 20, 2026
Merged

nunoplopes merged 1 commit into
Cpp2Rust:masterfrom
lucic71:mutable

Conversation

@lucic71

@lucic71 lucic71 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Classes with mutable fields can modify the mutable fields even in const methods. For this reason, the receiver of const methods in classes that contain mutable fields should be &mut instead of &.

@nunoplopes
nunoplopes merged commit 02cdd79 into Cpp2Rust:master Sep 20, 2026
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