From 57f462428dc6d2ff5a12d32b495ec7fbf8a5fd34 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 4 Aug 2020 07:43:56 -0700 Subject: [PATCH] Increase the default buffer size --- include/fmt/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/os.h b/include/fmt/os.h index bb6503a8..7f2b2b28 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -357,7 +357,7 @@ struct buffer_size { struct ostream_params { int oflag = file::WRONLY | file::CREATE; - size_t buffer_size = BUFSIZ; + size_t buffer_size = BUFSIZ > 65536 ? BUFSIZ : 65536; ostream_params() {} @@ -430,7 +430,7 @@ class ostream : private detail::buffer { /** Opens a file for writing. Supported parameters passed in `params`: * ````: Output flags (``file::WRONLY | file::CREATE`` by default) - * ``buffer_size=``: Output buffer size (``BUFSIZ`` by default) + * ``buffer_size=``: Output buffer size */ template inline ostream output_file(cstring_view path, T... params) {