[libcxx-commits] [libcxx] [libc++] Implements filebuf unbuffered. (PR #76629)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 12 08:48:20 PDT 2024
================
@@ -0,0 +1,118 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// <fstream>
+
+// basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) override;
+
+#include <fstream>
+#include <cassert>
+
+#include "test_macros.h"
+
+template <class CharT>
+static std::size_t file_size(const char* filename) {
+ FILE* f = std::fopen(filename, "rb");
+ fseek(f, 0, SEEK_END);
----------------
ldionne wrote:
I would use qualified names here and below.
https://github.com/llvm/llvm-project/pull/76629
More information about the libcxx-commits
mailing list