hash: Add support for tuples
There is now builtin support for stdplus::hash<> and
stdplus::hashMulti(...) hashing std::tuple containers.
Change-Id: I0e0983c04d54302f00c811e5de0d949accee03d7
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/hash.cpp b/test/hash.cpp
index 23e0e26..d9bcd48 100644
--- a/test/hash.cpp
+++ b/test/hash.cpp
@@ -1,6 +1,7 @@
#include <stdplus/hash.hpp>
#include <string>
+#include <tuple>
#include <gtest/gtest.h>
@@ -11,7 +12,8 @@
{
EXPECT_EQ(0, hashMulti());
EXPECT_EQ(2654435834, hashMulti(1, 2));
- hashMulti(1, std::string("bacon"), nullptr);
+ std::tuple<std::string, int> t = {"s", 8};
+ hashMulti(1, std::string("bacon"), nullptr, t);
}
} // namespace stdplus