[libcxx-commits] [PATCH] D111197: [libc++] Verify span and string_view are trivially copyable
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 7 08:53:51 PDT 2021
Mordante accepted this revision as: Mordante.
Mordante added a comment.
LGTM modulo my last comment.
================
Comment at: libcxx/test/std/strings/string.view/trivially_copyable.compile.pass.cpp:20
+static_assert(std::is_trivially_copyable<std::basic_string_view<wchar_t> >::value, "");
+#if defined(__cpp_lib_char8_t) && __cpp_lib_char8_t >= 201811L
+static_assert(std::is_trivially_copyable<std::basic_string_view<char8_t> >::value, "");
----------------
Quuxplusone wrote:
> `#ifndef _LIBCPP_HAS_NO_CHAR8_T` plz
Actually I think we can remove the `#ifdef` since we only support compilers providing `char8_t`. In D110868 I've started to make the support unconditional, but that was put on hold due to the Buildkite issues. (For now I'll wait until the @ldionne's `wchar_t` changes have landed.) If you want to add an `#ifdef` please use @Quuxplusone's suggestion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111197/new/
https://reviews.llvm.org/D111197
More information about the libcxx-commits
mailing list