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

sha3.hpp: fix compile error with Boost 1.79 #3

Merged
merged 1 commit into from
Aug 20, 2022
Merged

Conversation

linh2931
Copy link
Member

Resolve AntelopeIO/leap#31

When compile benchmark/hash.cpp on Ubuntu 18.04 where Boost is 1.79, following error was reported:

In file included from ../benchmark/hash.cpp:2:
../libraries/fc/include/fc/crypto/sha3.hpp:105:8: error: 'hash' is not a class template
 struct hash<fc::sha3>
        ^~~~
../libraries/fc/include/fc/crypto/sha3.hpp:106:1: error: explicit specialization of non-template 'boost::hash'

Compiles on Ubuntu 20.04 and 22.04 were fine.

Fix is to include <boost/functional/hash.hpp> in sha3.hpp.

The error was
../libraries/fc/include/fc/crypto/sha3.hpp:105:8: error: 'hash' is not a class template
@linh2931 linh2931 requested a review from spoonincode August 20, 2022 21:31
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.

FC::sha3.hpp: failed to compile on Ubuntu 18.04 with Boost 1.79 when included from benchmark/hash.cpp
2 participants