Skip to content

Commit ca46047

Browse files
committed
Fix build error due to missing include
Error was: | literals.cpp: In function 'libp2p::common::Hash256 libp2p::common::operator""_hash256(const char*, size_t)': | literals.cpp:17:36: error: no matching function for call to 'min(size_t&, long unsigned int)' | 17 | std::copy_n(c, std::min(s, 32ul), hash.rbegin()); | | ^
1 parent 6d1bb76 commit ca46047

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/literals.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <libp2p/multi/multihash.hpp>
1212
#include <libp2p/peer/peer_id.hpp>
1313

14+
#include <algorithm>
15+
1416
namespace libp2p::common {
1517
libp2p::common::Hash256 operator""_hash256(const char *c, size_t s) {
1618
libp2p::common::Hash256 hash{};

0 commit comments

Comments
 (0)