Skip to content

Commit

Permalink
fix DelimWriter constructor over a filename
Browse files Browse the repository at this point in the history
cherry pick: vincentlaucsb#251
  • Loading branch information
hirohira9119 committed Oct 22, 2024
1 parent e24d625 commit b372c52
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/internal/csv_writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ namespace csv {
*
* @param[out] filename File to write to
*/
DelimWriter(const std::string& filename) : DelimWriter(std::ifstream(filename)) {};
DelimWriter(const std::string& filename) : DelimWriter(std::ofstream(filename)) {};

/** Destructor will flush remaining data
*
Expand Down
2 changes: 1 addition & 1 deletion single_include/csv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6722,7 +6722,7 @@ namespace csv {
*
* @param[out] filename File to write to
*/
DelimWriter(const std::string& filename) : DelimWriter(std::ifstream(filename)) {};
DelimWriter(const std::string& filename) : DelimWriter(std::ofstream(filename)) {};

/** Destructor will flush remaining data
*
Expand Down
2 changes: 1 addition & 1 deletion single_include_test/csv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6722,7 +6722,7 @@ namespace csv {
*
* @param[out] filename File to write to
*/
DelimWriter(const std::string& filename) : DelimWriter(std::ifstream(filename)) {};
DelimWriter(const std::string& filename) : DelimWriter(std::ofstream(filename)) {};

/** Destructor will flush remaining data
*
Expand Down

0 comments on commit b372c52

Please sign in to comment.