[PATCH] [libc++] Do not derive __gnu_cxx::hash<T> from std::hash<T>.

Peter Collingbourne peter at pcc.me.uk
Wed Mar 5 20:16:26 PST 2014


  Thanks, committing.


================
Comment at: test/extensions/hash/specializations.fail.cpp:16
@@ +15,3 @@
+{
+    assert(__gnu_cxx::hash<std::string>()("") == 0);  // error
+}
----------------
Marshall Clow wrote:
> 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. ]
Done.


http://llvm-reviews.chandlerc.com/D2747



More information about the cfe-commits mailing list