Skip to content

Add missing C++ standard library includes#448

Merged
sportokalidis merged 1 commit into
BioDynaMo:masterfrom
stanbot8:fix/missing-std-includes
Mar 13, 2026
Merged

Add missing C++ standard library includes#448
sportokalidis merged 1 commit into
BioDynaMo:masterfrom
stanbot8:fix/missing-std-includes

Conversation

@stanbot8

Copy link
Copy Markdown
Contributor

Summary

Added explicit #include <cmath> to log_range_param.h and range_param.h. These headers use symbols from <cmath> but relied on transitive includes, which can break with different compilers or standard library versions.

Test plan

  • Verify project builds successfully on CI

@sportokalidis

Copy link
Copy Markdown
Contributor

Hi @stanbot8,

Thanks for the PR!

I checked both headers and they do directly use symbols:

  • log_range_param.h uses std::pow(...) and std::round(...)
  • range_param.h uses std::round(...)

So adding an explicit #include <cmath> here makes sense.

Could you also add a short note on whether you hit a concrete build failure? That context would be helpful for the PR history.

@sportokalidis

Copy link
Copy Markdown
Contributor

Hi @stanbot8, the CI issue that prevented macos-system-ci and ubuntu-system-ci from running has been fixed on main.

Could you please update your PR branch with the latest main (merge main into your branch, or rebase onto main) and push?
That should trigger the missing system CI workflows on this PR.

@stanbot8 stanbot8 force-pushed the fix/missing-std-includes branch from 94c2d73 to 938c709 Compare March 11, 2026 16:34
@stanbot8

Copy link
Copy Markdown
Contributor Author

Hi @sportokalidis, I've rebased all my open PRs onto the latest main. CI should be able to run on them now.

@sportokalidis sportokalidis left a comment

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.

Looks good to me. Thanks for your contribution!

log_range_param.h and range_param.h rely on <cmath> being transitively
included through other headers. Adding explicit includes ensures correct
builds regardless of which headers are pulled in by dependencies.
@stanbot8 stanbot8 force-pushed the fix/missing-std-includes branch from 66c2482 to 3e5865b Compare March 12, 2026 14:34
@sportokalidis sportokalidis merged commit 9935808 into BioDynaMo:master Mar 13, 2026
9 of 10 checks passed
@stanbot8 stanbot8 deleted the fix/missing-std-includes branch March 30, 2026 03:43
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