Skip to content

[Helper] ScopedAdvancedTimer: add a compile-time check on string argument in macros#6036

Open
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:scopedtimerdyn_ensure_constexpr
Open

[Helper] ScopedAdvancedTimer: add a compile-time check on string argument in macros#6036
fredroy wants to merge 2 commits intosofa-framework:masterfrom
fredroy:scopedtimerdyn_ensure_constexpr

Conversation

@fredroy
Copy link
Contributor

@fredroy fredroy commented Mar 19, 2026

This will ensure that the developer will use the good macro, even if it is not compiled with Tracy.

The diagnostic message is not the best but I think it is good enough (c)

Screenshot 2026-03-19 at 09 15 23

And breaking because it might break external plugins using these macro.

(NOTE: i wanted to do first a consteval lambda to avoid declaring a function but the compilers on the CI are too "old" 👴 )


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: breaking Change possibly inducing a compilation error pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Mar 19, 2026
@bakpaul bakpaul added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: breaking Change possibly inducing a compilation error pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants