Skip to content

Translate NaN float values - #646

Merged
nunoplopes merged 7 commits into
Cpp2Rust:masterfrom
lucic71:69-non-finite-float-literals
Nov 18, 2026
Merged

nunoplopes merged 7 commits into
Cpp2Rust:masterfrom
lucic71:69-non-finite-float-literals

Conversation

@lucic71

@lucic71 lucic71 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.


std::string GetNumAsString(llvm::APFloat value) {
auto format = [&](std::string_view ty, std::string finite) {
if (value.isNaN()) {

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.

this should use ty::NAN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@nunoplopes
nunoplopes merged commit c422a93 into Cpp2Rust:master Nov 18, 2026
8 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