[libcxx-commits] [PATCH] D143972: [libc++] LWG 3857: allow `string_view` conversion when only traits vary
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 14 01:50:12 PST 2023
philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp:162
static_assert(std::is_constructible_v<std::basic_string_view<char, CCT>, WithTraitsType<CCT>>);
-static_assert(!std::is_constructible_v<std::string_view, WithTraitsType<CCT>>); // wrong traits type
+static_assert(std::is_constructible_v<std::string_view, WithTraitsType<CCT>>); // wrong traits type
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
----------------
jloser wrote:
> I slightly prefer ripping this (and the few lines above it) out entirely. It was originally just to model this constraint failure case. How do others feel? I've left it in for now, but it's not testing anything too useful now IMO.
I think we can remove the `static_assert`s, since we have a runtime test now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143972/new/
https://reviews.llvm.org/D143972
More information about the libcxx-commits
mailing list