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

GH-36214: [C++] Specify FieldPath::Hash as template parameter where possible #36222

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

benibus
Copy link
Collaborator

@benibus benibus commented Jun 21, 2023

Rationale for this change

Internal specializations of std::hash<FieldPath> have caused multiple-definition errors with unity builds.

What changes are included in this PR?

To avoid exposing a global specialization of std::hash (which must be declared in the std namespace), this specifies the FieldPath::Hash helper as a template parameter to hashable containers instead.

Are these changes tested?

Yes (covered by existing tests)

Are there any user-facing changes?

No

@benibus benibus requested a review from westonpace as a code owner June 21, 2023 20:31
@github-actions github-actions bot added the awaiting review Awaiting review label Jun 21, 2023
@benibus benibus changed the title GH-36214: [C++] Specify FieldPath::Hash as template parameter where possible GH-36214: [C++] Specify FieldPath::Hash as template parameter where possible Jun 21, 2023
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jun 22, 2023
@pitrou pitrou merged commit c875da8 into apache:main Jun 22, 2023
34 of 36 checks passed
@conbench-apache-arrow
Copy link

Conbench analyzed the 6 benchmark runs on commit c875da82.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

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

Successfully merging this pull request may close these issues.

[C++] Multiple definitions of std::hash<FieldPath> in unity builds
2 participants