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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 7 06:57:02 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) {
----------------
ldionne wrote:

I think this comment is the same as Mark's comment above (https://github.com/llvm/llvm-project/pull/74624#discussion_r1417654689)? If not, I misunderstood your comment.

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


More information about the libcxx-commits mailing list