Refactor: avoid C-style macros by refactoring macros.h to proper templated functions for better type-safety #69
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 171 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.308
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #69"
general
weight: 0.35
lknknm
Description:
After having a few warning messages regarding C-style macros, I started refactoring the whole
macros.hfile to support templated functions as an initiative to study them a bit better and to have more type-safety for a properLogger. I think it's also important to modernize how we're using C++ here and how to ensure safety through compile time evaluations.Addition of the
log_t<log_level>(...)API:With this, it will now be possible to call the log functions as:
or even without a template argument as such:
Addition of the
color_str<color>(...)API:With this API it's now possible to format strings using colors for object naming in a way they are more visible in the console, hence more debuggeable:
Link to compiler explorer
The current changes can be studied and debugged inside compiler explorer through the link:
https://godbolt.org/z/1vKW77TnY
Useful Resources
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2347r2.pdf