Fix move constructor (#1844)

This commit is contained in:
Victor Zverovich committed 2020-09-01 08:48:56 -07:00
1 parent 69902c1787
commit 6cccdc24bc
2 files changed
+9 -1

No files matched your search

+6
View File
@@ -287,6 +287,12 @@ TEST(BufferedFileTest, Fileno) {
EXPECT_READ(copy, FILE_CONTENT);
}
TEST(OStreamTest, Move) {
fmt::ostream out = fmt::output_file("test-file");
fmt::ostream moved(std::move(out));
moved.print("hello");
}
TEST(OStreamTest, Print) {
fmt::ostream out = fmt::output_file("test-file");
out.print("The answer is {}.\n", 42);