Commit c78f31f
fix: Enable runtime calls to mp_units::inverse() on Clang 18-20
Problem: Clang 18-20 strict immediate function enforcement prevents runtime
calls to mp_units::inverse() due to internal consteval operators.
Solution: Modified MP_UNITS_CONSTEVAL to use constexpr for Clang <21,
consteval for Clang >=21. Preserves compile-time optimization while
enabling runtime usage.
Testing: Added comprehensive runtime tests for inverse() function covering
time-to-frequency conversion, runtime parameters, and unit conversion.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0955170 commit c78f31f
File tree
2 files changed
+28
-1
lines changed- src/core/include/mp-units/bits
- test/runtime
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
592 | 619 | | |
0 commit comments