Skip to content

Statically allocate string concatinations using FMT #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
saikishor opened this issue Dec 2, 2024 · 5 comments · Fixed by #2205
Closed

Statically allocate string concatinations using FMT #1906

saikishor opened this issue Dec 2, 2024 · 5 comments · Fixed by #2205

Comments

@saikishor
Copy link
Member

          could we please add a follow-up issue to make this statically allocated by using FMT?

Originally posted by @bmagyar in #1871 (comment)

Copy link
Contributor

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

@mini-1235
Copy link
Contributor

mini-1235 commented Apr 15, 2025

I am not sure if I understand this issue correctly, does it mean to add something like

const auto diag_summary = fmt::format(
    "Controller Manager has bad periodicity: {:.2f} Hz. Expected consistent {:.2f} Hz",
    cm_stats.average, get_update_rate());

to replace the original one?

@christophfroehlich
Copy link
Contributor

I think so, yes @saikishor?

@saikishor
Copy link
Member Author

@mini-1235 Yes, we need to do it similar way, the only thing is it is missing FMT_COMPILE . You can check more details here : https://fmt.dev/9.1.0/api.html#format-string-compilation

@mini-1235
Copy link
Contributor

@mini-1235 Yes, we need to do it similar way, the only thing is it is missing FMT_COMPILE . You can check more details here : https://fmt.dev/9.1.0/api.html#format-string-compilation

@saikishor thanks for the guidance! I have opened a PR for it

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

Successfully merging a pull request may close this issue.

3 participants