Skip to content
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

Fix build with fmt 10 #1141

Closed
wants to merge 1 commit into from
Closed

Conversation

FtZPetruska
Copy link
Contributor

Fixes #1140

Starting version 10, fmt requires enums to be explicitly casted to their underlying type or have a format_as overload.

This PR addresses this issue by:

  • defining format_as overloads for enums declared within the project, since all enums have type specifier, they can be directly casted to the underlying type.
  • using fmt::underlying for apache::thrift::transport::TTransportException since it is provided by a dependency.

Enums need to have a format_as overload or to be casted to their
underlying type.
@facebook-github-bot
Copy link
Contributor

@genevievehelsel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@genevievehelsel merged this pull request in 812e043.

@FtZPetruska FtZPetruska deleted the fix-fmt-10 branch October 13, 2023 13:02
facebook-github-bot pushed a commit to facebook/hhvm that referenced this pull request Oct 23, 2023
Summary:
Fixes facebook/watchman#1140

Starting version 10, fmt requires enums to be explicitly casted to their underlying type or have a `format_as` overload.

This PR addresses this issue by:
- defining `format_as` overloads for enums declared within the project, since all enums have type specifier, they can be directly casted to the underlying type.
- using `fmt::underlying` for `apache::thrift::transport::TTransportException` since it is provided by a dependency.

X-link: facebook/watchman#1141

Reviewed By: xavierd

Differential Revision: D50095318

Pulled By: genevievehelsel

fbshipit-source-id: 981b5efcfaa63ecb932a59dcac916d524345a247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to compile with fmt 10.0.0
2 participants