[libcxx-commits] [PATCH] D110718: [libc++] Implement P1391
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 30 10:13:41 PDT 2021
Mordante added inline comments.
================
Comment at: libcxx/test/std/strings/string.view/string.view.cons/deduct.pass.cpp:34
+ test<wchar_t>();
+ test<char8_t>();
+ test<char16_t>();
----------------
jloser wrote:
> Mordante wrote:
> > `char8_t` should be guarded by `#ifndef _LIBCPP_HAS_NO_CHAR8_T`.
> I just added the guard, but can you elaborate on why it's necessary? `char8_t` is a C++20 type and this is a C++20-or-later constructor we've added in `string_view`. Given that we support `char8_t`, I thought it could be used unconditionally without loss of generality. FWIW, CI passed without the guard.
At the moment all usage of `char8_t` is guarded by this. Looking at cppreference it seems all our supported compilers implement this feature. So it's indeed no longer required. I'll create a patch to remove `_LIBCPP_HAS_NO_CHAR8_T` from `__config` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110718/new/
https://reviews.llvm.org/D110718
More information about the libcxx-commits
mailing list