[libcxx-commits] [libcxx] [libc++] Refactor basic_filebuf::overflow() (PR #144793)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 23 02:20:14 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:
Wouldn't `epptr() - pbase()` be the capacity? Maybe the terminology is ambiguous here.
https://github.com/llvm/llvm-project/pull/144793
More information about the libcxx-commits
mailing list