[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
Wed Dec 2 09:17:46 PST 2020
mclow.lists added inline comments.
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);
> mclow.lists wrote:
> > Here too.
> I think test (due to being a library client) should continue checking the flag defined by the standard `__cpp_lib_char8_t`.
> I have fixed it to check the value of the macro,
Since the test is libc++-specific (it's in the test/libcxx hierarchy, as opposed to test/std), it *could* use `_LIBCPP_NO_HAS_CHAR8_T`. However, this is fine.
CHANGES SINCE LAST ACTION
More information about the libcxx-commits