csv-parser
csv-parser copied to clipboard
CSVReader fails with files bigger than 10 MB when constructed with std::ifstream
I used to construct CVSReader with a std::ifstream as follows:
const std::filesystem::path file_path {"foo"};
std::ifstream input(file_path , std::ios::binary | std::ios::in);
csv::CSVReader path_reader {input};
It is working perfectly fine with relatively small files, but it throws an exception with files bigger than 10 MB.
I found out that the same files work perfectly fine when using the other CVSReader constructor, taking the filename as parameter:
const std::filesystem::path file_path {"foo"};
csv::CSVReader path_reader {file_path.string()};
(Unfortunately I can't share with you an example because I don't own them.)
Duplicate of #180