Skip to content

refactor: remove dependency to boost.math#532

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/drop-math-dependency
Open

refactor: remove dependency to boost.math#532
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:refactor/drop-math-dependency

Conversation

@Becheler

@Becheler Becheler commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

  • remove boost.math headers and deps in CML/build.jam
  • use C++11 std::hypot
  • define a local pi and square root constant

Motivation

Remove dependency on Boost.Math: it's overkill here for just one STL function and 2 constants.

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@Becheler Becheler self-assigned this Jul 17, 2026
@Becheler Becheler added the technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. label Jul 17, 2026
@github-actions

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 29569473885 vs develop run 29503421582 (5a18325250).

Header-inclusion weights (graph files pulling each direct dependency in):

Dependency develop PR Δ
math 2 0 -2

Transitive Boost modules: 69 → 69 (0)

@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 29569473921 vs develop run 29503421610 (5a18325250).

Job Baseline After Delta
macos (clang, 14) 4 4 0
macos (clang, 17) 4 4 0
macos (clang, 20) 4 4 0
ubuntu (clang-19, 14) 4 4 0
ubuntu (clang-19, 17) 4 4 0
ubuntu (clang-19, 20) 4 4 0
ubuntu (clang-19, 23) 4 4 0
ubuntu (gcc-14, 14) 10 10 0
ubuntu (gcc-14, 17) 10 10 0
ubuntu (gcc-14, 20) 10 10 0
ubuntu (gcc-14, 23) 10 10 0
windows_msvc_14_3 (msvc-14.3) 971 971 0

@Becheler
Becheler marked this pull request as ready for review July 17, 2026 11:04
@Becheler
Becheler requested a review from jeremy-murphy as a code owner July 17, 2026 11:04

@jeremy-murphy jeremy-murphy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why did you flag this as a breaking change? It doesn't seem like it to me.

@Becheler

Becheler commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

I don't think I flagged this PR as breaking. The breaking change is in another one, where BGL public API exposed MPL types, that can now be STL types.
Edit: oops I totally did flag it by mistake - my bad ! Friday fatigue hitting hard 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants