Skip to content

Translate access of static member through object - #430

Merged
nunoplopes merged 5 commits into
Cpp2Rust:masterfrom
lucic71:static-field-access
Sep 28, 2026
Merged

nunoplopes merged 5 commits into
Cpp2Rust:masterfrom
lucic71:static-field-access

Conversation

@lucic71

@lucic71 lucic71 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor
struct S {
  static int static_member = 0;
}

assert(S{}.static_member == 0);
assert(S::static_member == 0);

Both are valid C++. Same for static methods.

@nunoplopes
nunoplopes merged commit 73d08a8 into Cpp2Rust:master Sep 28, 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