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

Fix hash<IPv4/6Address> build issues in VC

* fixed compile failure due to macro

* add functional to cxxstd.h to try to fix mac

* clang bug identified, moving functional include to later

* last step, move hash def to header

* avoid allocation on hash

* set ipv6 back to string hash
This commit is contained in:
solvingj
2017-09-19 22:00:28 -04:00
committed by Matias Fontanini
parent e48f64daac
commit a7dd867503
4 changed files with 12 additions and 24 deletions

View File

@@ -152,13 +152,3 @@ IPv6Address operator&(const IPv6Address& lhs, const IPv6Address& rhs) {
}
} // Tins
#if TINS_IS_CXX11
namespace std {
size_t hash<Tins::IPv6Address>::operator()(const Tins::IPv6Address& addr) const {
return std::hash<string>()(addr.to_string());
}
} // std
#endif // TINS_IS_CXX11