1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 12:14:26 +01:00

Fix build issues due to std::hash missing

This commit is contained in:
Matias Fontanini
2017-04-30 19:55:23 -07:00
parent 60b5f3e6e4
commit 3f2f6438fd
5 changed files with 25 additions and 6 deletions

View File

@@ -37,6 +37,10 @@
#include <ws2tcpip.h>
#include <mstcpip.h>
#endif
#if TINS_IS_CXX11
// std::hash
#include <memory>
#endif // TINS_IS_CXX11
#include <limits>
#include <sstream>
#include <iostream>
@@ -148,3 +152,8 @@ IPv6Address operator&(const IPv6Address& lhs, const IPv6Address& rhs) {
}
} // Tins
// Hash
size_t std::hash<Tins::IPv6Address>::operator()(const Tins::IPv6Address& addr) const {
return std::hash<string>()(addr.to_string());
}