[libcxx-commits] [libcxx] [libc++] Refactors fstream open. (PR #76617)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 11 09:31:20 PST 2024
================
@@ -282,6 +285,25 @@ private:
void __write_mode();
_LIBCPP_EXPORTED_FROM_ABI friend FILE* __get_ostream_file(ostream&);
+
+ // There are multiple (__)open function, they use different C-API open
+ // function. After that call these functions behave the same. This function
+ // does that part and determines the final return value.
+ _LIBCPP_HIDE_FROM_ABI basic_filebuf* __open_common_part(ios_base::openmode __mode) {
----------------
mordante wrote:
I looked at your suggestion, using a `_OpenFunc` template argument seems more trouble than it's worth, since C++ does not support lambda expressions. Instead I used the new name and added a `FILE*` as argument to this function.
https://github.com/llvm/llvm-project/pull/76617
More information about the libcxx-commits
mailing list