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 errors for Clang 16 #4501

Merged
merged 4 commits into from Apr 21, 2023
Merged

Fix errors for Clang 16 #4501

merged 4 commits into from Apr 21, 2023

Conversation

thejohnfreeman
Copy link
Collaborator

@thejohnfreeman thejohnfreeman commented Apr 16, 2023

  • std::{u,bi}nary_function were removed in C++17. They were empty classes with a few associated types. We already have conditional code to define the types. Just make it unconditional.
  • libc++ checks a cast in an unevaluated context to see if a type inherits from a binary function class in the standard library, e.g. std::equal_to, and this causes an error when the type privately inherits from such a class. Change these instances to public inheritance.
  • We don't need a middle-man for the empty base optimization. Prefer to inherit directly from an empty class than from beast::detail::empty_base_optimization.
  • Clang warns when all the uses of a variable are removed by conditional compilation of assertions. Add a [[maybe_unused]] annotation to suppress it.
  • As a drive-by clean-up, remove commented code.

See related work in #4486.

Copy link
Contributor

@HowardHinnant HowardHinnant left a comment

Choose a reason for hiding this comment

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

I recommend changing this commit message to:
[FOLD] Format code

@thejohnfreeman
Copy link
Collaborator Author

thejohnfreeman commented Apr 20, 2023

I expect this whole PR to be squashed into one commit, with the message subject line matching the PR title and message body matching the first comment.

Copy link
Collaborator

@seelabs seelabs left a comment

Choose a reason for hiding this comment

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

👍

@intelliot intelliot merged commit 8d482d3 into XRPLF:develop Apr 21, 2023
4 checks passed
@thejohnfreeman thejohnfreeman deleted the mac branch April 25, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants