[llvm-branch-commits] [libcxx] [libc++][format][4/7] Improves std::format_to performance. (PR #101823)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 20 09:51:18 PDT 2024


================
@@ -722,6 +724,95 @@ class _LIBCPP_TEMPLATE_VIS __allocating_buffer : public __output_buffer<_CharT>
   }
 };
 
+// A buffer that directly writes to the underlying buffer.
+template <class _OutIt, __fmt_char_type _CharT>
----------------
ldionne wrote:

```suggestion
template <contiguous_iterator _OutIt, __fmt_char_type _CharT>
```

That way, you don't need to `__unwrap_iter` below and we can keep the bounds information when there is some.

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


More information about the llvm-branch-commits mailing list