[libcxx-commits] [PATCH] D143972: [libc++] LWG 3857: allow `string_view` conversion when only traits vary

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 14 07:29:50 PST 2023


jloser added inline comments.


================
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
----------------
philnik wrote:
> 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.
SGTM — just removed them.


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