[libcxx-commits] [PATCH] D138596: [libc++] Keep char_traits<T> for arbitrary T around until LLVM 18

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 23 12:15:03 PST 2022


ldionne added a subscriber: Mordante.
ldionne added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp:84
   assert_is_formattable<CharT[42], CharT>();
-  assert_is_formattable<std::basic_string<CharT>, CharT>();
-  assert_is_formattable<std::basic_string_view<CharT>, CharT>();
+  if constexpr (!std::same_as<CharT, int>) { // string and string_view only work with proper character types
+    assert_is_formattable<std::basic_string<CharT>, CharT>();
----------------
@Mordante Did you really mean to test `std::format` with a character type of `int`? Is that meaningful?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138596/new/

https://reviews.llvm.org/D138596



More information about the libcxx-commits mailing list