mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-03 15:41:53 +01:00
Fix ofstream handling in msvc
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
//
|
||||
// For the license information refer to format.h.
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "fmt/format.h"
|
||||
|
||||
using fmt::runtime;
|
||||
@@ -297,3 +299,8 @@ TEST(ostream_test, is_formattable) {
|
||||
EXPECT_TRUE(fmt::is_formattable<std::string>());
|
||||
EXPECT_TRUE(fmt::is_formattable<fmt::detail::std_string_view<char>>());
|
||||
}
|
||||
|
||||
TEST(ostream_test, closed_ofstream) {
|
||||
std::ofstream ofs;
|
||||
fmt::print(ofs, "discard");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user