[libcxx-commits] [libcxx] [libc++][strings] P2591R5: Concatenation of strings and string views (PR #88389)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sun May 19 23:36:02 PDT 2024


================
@@ -101,6 +101,9 @@ constexpr void test(const CharT* x, const CharT* y, const CharT* expected) {
   }
   // string_view + string&&
   {
+    // Create a `basic_string` to workaround clang bug:
+    // https://github.com/llvm/llvm-project/issues/92382
+    // Comparison between pointers to a string literal and some other object results in constant evaluation failure.
     std::basic_string<CharT, TraitsT, AllocT> st_{x, allocator};
     std::basic_string_view<CharT, TraitsT> sv{st_};
----------------
Zingam wrote:

For the record this is a workaround for: https://github.com/llvm/llvm-project/issues/92382

https://github.com/llvm/llvm-project/pull/88389


More information about the libcxx-commits mailing list