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

Use std::allocator_traits::rebind_alloc instead of std::allocator::rebind #4373

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

vlstill
Copy link
Contributor

@vlstill vlstill commented Jan 29, 2024

The latter is deprecated in C++17 and removed in C++20.

@vlstill
Copy link
Contributor Author

vlstill commented Jan 29, 2024

The is the first part of #4297 which is too large to be done in one go.

I am fully aware this is the same change as #4364, but since that one does not pass and I had this patch already done, I've raised this separate PR.

@vlstill vlstill requested a review from fruffy January 29, 2024 15:45
@vlstill vlstill self-assigned this Jan 29, 2024
@vlstill vlstill added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Jan 29, 2024
@fruffy fruffy requested a review from smolkaj January 29, 2024 16:43
Copy link
Member

@smolkaj smolkaj left a comment

Choose a reason for hiding this comment

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

Sweet, thanks!

@ChrisDodd
Copy link
Contributor

ChrisDodd commented Jan 29, 2024

Do we need an #if __cplusplus >= 20170101 ... here as rebind_alloc does not exist in earlier versions?

@fruffy fruffy added the run-ubuntu18 Use this tag to trigger a Ubuntu-18 CI run. label Jan 30, 2024
@fruffy
Copy link
Collaborator

fruffy commented Jan 30, 2024

Do we need an #if __cplusplus >= 20170101 ... here as rebind_alloc does not exist in earlier versions?

Both of P4C's build tools (CMake and Bazel) require C++17 and the corresponding compilers as minimum version. It was introduced with this PR: #3547. Over the past year no one has raised any concerns.

@vlstill vlstill merged commit c6e817d into p4lang:main Jan 30, 2024
16 checks passed
@vlstill vlstill deleted the allocator-deprec branch January 30, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser) run-ubuntu18 Use this tag to trigger a Ubuntu-18 CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants