[libcxx-commits] [libcxx] [libc++] Refactor basic_filebuf::overflow() (PR #144793)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 19 00:34:35 PDT 2025


================
@@ -835,35 +835,50 @@ typename basic_filebuf<_CharT, _Traits>::int_type basic_filebuf<_CharT, _Traits>
   }
   if (this->pptr() != this->pbase()) {
     if (__always_noconv_) {
-      size_t __nmemb = static_cast<size_t>(this->pptr() - this->pbase());
-      if (std::fwrite(this->pbase(), sizeof(char_type), __nmemb, __file_) != __nmemb)
+      size_t __n = static_cast<size_t>(this->pptr() - this->pbase());
----------------
philnik777 wrote:

Maybe name this `__put_buffer_size`?

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


More information about the libcxx-commits mailing list