[libcxx-commits] [libcxx] [libc++] Remove assumptions that std::array::iterator is a raw pointer (PR #74624)

Christopher Di Bella via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 7 10:42:57 PST 2023


================
@@ -148,14 +151,15 @@ _LIBCPP_HIDE_FROM_ABI auto __format_char(
 // Integer
 //
 
-/** Wrapper around @ref to_chars, returning the output pointer. */
-template <integral _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, int __base) {
+/** Wrapper around @ref to_chars, returning the output iterator. */
+template <contiguous_iterator _Iterator, integral _Tp>
+_LIBCPP_HIDE_FROM_ABI _Iterator __to_buffer(_Iterator __first, _Iterator __last, _Tp __value, int __base) {
----------------
cjdb wrote:

Ah, yep, let's continue there.

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


More information about the libcxx-commits mailing list