Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/internal/csv_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ namespace csv {
*
* @param[out] filename File to write to
*/
DelimWriter(const std::string& filename) : DelimWriter(std::ifstream(filename)) {};
DelimWriter(const std::string& filename) : out(inner_os) {
inner_os.open(filename, std::ios::out);
};

/** Destructor will flush remaining data
*
Expand Down Expand Up @@ -361,6 +363,7 @@ namespace csv {
}

OutputStream & out;
std::ofstream inner_os;
bool quote_minimal;
};

Expand Down