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

STL hash to avoid int traps #9

Open
wants to merge 1 commit into
base: hydro-devel
Choose a base branch
from

Conversation

efernandez
Copy link
Contributor

With some flags, the program fails because of the integer operations.
Furthermore, it looks reasonable to use the STL hash function, unless there's some reason to use the other.

@efernandez
Copy link
Contributor Author

Pull request against hydro-devel branch.
Closed #6

Sorry for the noise

@ahornung
Copy link
Owner

I think std::hash is also C++11 / tr1 only. Maybe there is a way to disable -ftrapv instead for the hashing code block?

@efernandez
Copy link
Contributor Author

Yes, it's C++11.
I'll have to check how to disable -ftrapv in my environment (I have to check where was the problem exactly).
I don't know how we can do it in a general way (if something sets it).

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

Successfully merging this pull request may close these issues.

2 participants