Repository navigation
refactor(tests): extract fixed_point_bounds.h (re-target of #3138) - #3160
Conversation
…3130) Third extraction in #3130, the keystone for the remaining four per-type PRs. Moves the accuracy_bounds<T> template specialization table (original lines 126-331 = 6 specializations + their out-of-line definitions) into a new shared header. Include pattern: each consumer .cpp file includes fixed_point_bounds.h from WITHIN its anonymous namespace, so each translation unit gets its own private copy. This avoids ODR concerns with the out-of-line constexpr static member definitions, which are still required for C++11/C++14 compatibility on this codebase. Header uses fully-qualified fl::s4x12 etc., so it works regardless of whether the consumer has 'using namespace fl;' in scope. Unblocks the upcoming per-type extractions: - fixed_point_signed_types.cpp - fixed_point_u4x12_u8x8.cpp - fixed_point_u12x4_u16x16.cpp - fixed_point_u8x24_u24x8.cpp Tests pass: bash test fl_math_fixed_point --cpp (1/1, 0.28s test time, 69.5s build). fixed_point.cpp: 4,488 -> 4,277 LOC fixed_point_bounds.h (new): 230 LOC Stacked on feat/3130-fixed-point-constexpr-extract (PR #3136), which is stacked on feat/3130-fixed-point-misc-extract (PR #3135). Both predecessors are required because they introduce the ci/hooks/check_test_file_pairing.py sibling-split allowance. Part of #3130. Meta tracking issue: #3127. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesExtract accuracy_bounds to shared header
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Re-opening of #3138 (closed when base branch merged). Bounds.h keystone for #3130.
Summary by CodeRabbit