[PATCH] [libc++] Do not derive __gnu_cxx::hash<T> from std::hash<T>.
Marshall Clow
mclow.lists at gmail.com
Wed Mar 5 19:16:17 PST 2014
Other than the one test that I commented on, this looks ok to me.
================
Comment at: test/extensions/hash/specializations.fail.cpp:16
@@ +15,3 @@
+{
+ assert(__gnu_cxx::hash<std::string>()("") == 0); // error
+}
----------------
Now about
assert(__gnu_cxx::hash<std::string>()(std::string()) == 0); // error
instead?
That way you can't get caught up with implicit conversions.
[ I don't think it will matter, but I've been caught out before by failing tests failing, but for the wrong reason. ]
http://llvm-reviews.chandlerc.com/D2747
More information about the cfe-commits
mailing list