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

Possible Bug in the Definition of the Hash Structure #89

Closed
Iridescent-Xuan opened this issue Jan 2, 2024 · 2 comments · Fixed by #90
Closed

Possible Bug in the Definition of the Hash Structure #89

Iridescent-Xuan opened this issue Jan 2, 2024 · 2 comments · Fixed by #90
Assignees
Labels
bug Something isn't working

Comments

@Iridescent-Xuan
Copy link

I'm learning the awesome work of IPC, and I really appreciate your generous contribution to this toolkit!

But when compiling the unordered_map_and_set.hpp (I don't set the abseil option, so the Hash structure is defined separately), some warning from GCC occurs, which says that the Hash::combine function is "returning reference to temporary". If I ignore the warning from compiler, segmentation fault happens when running into this line.

I'm not quite familiar with std::move or Rvalue reference, but I think there might be something wrong in this line, where you seem to return the reference of a temporary Hash variable.

@Iridescent-Xuan Iridescent-Xuan added the question Further information is requested label Jan 2, 2024
@zfergus
Copy link
Member

zfergus commented Jan 2, 2024

PR #90 should fix this issue for you.

@zfergus zfergus added bug Something isn't working and removed question Further information is requested labels Jan 2, 2024
@Iridescent-Xuan
Copy link
Author

PR #90 should fix this issue for you.

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants