Skip to content

Translate if constexpr - #345

Open
lucic71 wants to merge 2 commits into
Cpp2Rust:masterfrom
lucic71:if-constexpr
Open

Translate if constexpr#345
lucic71 wants to merge 2 commits into
Cpp2Rust:masterfrom
lucic71:if-constexpr

Conversation

@lucic71

@lucic71 lucic71 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@lucic71 lucic71 changed the title If constexpr Translate if constexpr Sep 9, 2026

bool Converter::VisitIfStmt(clang::IfStmt *stmt) {
if (stmt->isConstexpr()) {
if (auto taken = stmt->getNondiscardedCase(ctx_)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it would be good to keep all branches for documentation purposes. Constant folding here is not what a real project wants in general.

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