Skip to content

Update fmt Formatters for Compatibility with Versions below 11 - #3172

Merged
paulromano merged 2 commits into
openmc-dev:developfrom
ahnaf-tahmid-chowdhury:fmt-devel
Oct 18, 2024
Merged

paulromano merged 2 commits into
openmc-dev:developfrom
ahnaf-tahmid-chowdhury:fmt-devel

Conversation

@ahnaf-tahmid-chowdhury

Copy link
Copy Markdown
Contributor

Description

This PR updates the custom fmt formatters for openmc::Position and std::array<T, 2> to ensure compatibility with fmt library version below 11. The update uses preprocessor directives to conditionally define the format function as const for fmt versions 11.0.0 and above.

Changes

  • Updated formatter<openmc::Position>:
    • Added a conditional const qualifier to the format function based on FMT_VERSION.
  • Updated formatter<std::array<T, 2>>:
    • Added a conditional const qualifier to the format function based on FMT_VERSION.

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@paulromano
paulromano merged commit 82a6f9e into openmc-dev:develop Oct 18, 2024
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants