[libcxx-commits] [PATCH] D92325: Add std::hash<char8_t> specialization if char8_t is enabled
Marshall Clow via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 30 08:12:46 PST 2020
mclow.lists added inline comments.
================
Comment at: libcxx/include/utility:1367
+#ifdef __cpp_char8_t
+template <>
+struct _LIBCPP_TEMPLATE_VIS hash<char8_t>
----------------
I think this should be `#ifndef _LIBCPP_NO_HAS_CHAR8_T`
================
Comment at: libcxx/test/libcxx/extensions/hash/specializations.pass.cpp:26
assert(__gnu_cxx::hash<unsigned char>()(42) == 42);
+ #ifdef __cpp_lib_char8_t
+ assert(__gnu_cxx::hash<char8_t>()(42) == 42);
----------------
Here too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92325/new/
https://reviews.llvm.org/D92325
More information about the libcxx-commits
mailing list