Skip to content

Add Inc and Dec traits for enums#153

Merged
nunoplopes merged 2 commits into
Cpp2Rust:masterfrom
lucic71:enum-inc
May 26, 2026
Merged

Add Inc and Dec traits for enums#153
nunoplopes merged 2 commits into
Cpp2Rust:masterfrom
lucic71:enum-inc

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 26, 2026

This implements PostfixInc, PrefixInc, PostfixDec, PrefixDec for all user defined enum types.

Instead of generatic more than 30 lines of trait implementations per user-defined enum, I declared a macro in libcc2rs that enums call in order to take care of the actual trait implementation.

@nunoplopes nunoplopes merged commit 943b97c into Cpp2Rust:master May 26, 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