diff --git a/include/hw_address.h b/include/hw_address.h index 38d4d51..353c07e 100644 --- a/include/hw_address.h +++ b/include/hw_address.h @@ -37,6 +37,7 @@ #include #include #include +#include "cxxstd.h" namespace Tins { /** @@ -319,5 +320,16 @@ void HWAddress::convert(const std::string &hw_addr, } } } -} +} // namespace Tins +#if TINS_IS_CXX11 +namespace std +{ +template +struct hash> { + size_t operator()(const Tins::HWAddress &addr) const { + return std::hash()(addr.to_string()); + } +}; +} // namespace std +#endif #endif // TINS_HWADDRESS_H