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 hash.h compile errors in newer compilers #3783

Merged
merged 1 commit into from Nov 20, 2017

Conversation

Projects
None yet
4 participants
@apaszke
Copy link
Member

apaszke commented Nov 19, 2017

Disable the default std::hash<T> overload if T is an enum type.

Fix hash.h compile errors in newer compilers
Disable the default std::hash<T> overload if T is an enum type.

@apaszke apaszke requested a review from colesbury Nov 19, 2017

@stefan-it

This comment has been minimized.

Copy link
Contributor

stefan-it commented Nov 19, 2017

GCC 7 is fine now. I'm currently testing some other compilers :)

@fmassa fmassa referenced this pull request Nov 19, 2017

Closed

Add windows support please #494

@peterjc123

This comment has been minimized.

Copy link
Contributor

peterjc123 commented Nov 20, 2017

@apaszke My mistake. It works on MSVC. Thanks.

@stefan-it

This comment has been minimized.

Copy link
Contributor

stefan-it commented Nov 20, 2017

I can confirm that this patch works on Ubuntu 16.04 with:

  • GCC 4.9.4
  • GCC 5.4.1
  • GCC 6.3.0
  • GCC 4.8.5
  • clang 3.8.0

And as mentioned above on Arch Linux with GCC 7.2.0 and clang 5.0 :)

@soumith soumith merged commit 4d405a4 into master Nov 20, 2017

5 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
pr/pytorch-linux-xenial-cuda8-cudnn6-py2 Build successful
Details
pr/pytorch-linux-xenial-cuda8-cudnn6-py3 Build successful
Details
pr/pytorch-linux-xenial-cuda9-cudnn7-py2 Build successful
Details
pr/pytorch-linux-xenial-cuda9-cudnn7-py3 Build successful
Details
@soumith

This comment has been minimized.

Copy link
Member

soumith commented Nov 20, 2017

awesome, thanks a lot for testing this well @stefan-it !

@soumith soumith deleted the hash_fix branch Nov 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment