...
This commit is contained in:
@@ -450,7 +450,7 @@ public:
|
||||
std::error_code ec{};
|
||||
std::string output_buffer;
|
||||
|
||||
auto write_rec = [&output_buffer, &ec, this]<size_t I = 0>(this auto& self) {
|
||||
auto write_rec = [&output_buffer, &ec, this]<size_t I = 0>(this auto& self) -> void {
|
||||
if constexpr (I < NUMBER_OF_RECORDS) {
|
||||
// add an empty string within records
|
||||
std::format_to(std::back_inserter(output_buffer), "{}", DEFAULT_RECORD_DELIMITER);
|
||||
@@ -466,6 +466,13 @@ public:
|
||||
};
|
||||
|
||||
write_rec();
|
||||
|
||||
// [&output_buffer, &ec, this]<size_t... Is>(std::index_sequence<Is...>) {
|
||||
// ((std::format_to(std::back_inserter(output_buffer), "{}", DEFAULT_RECORD_DELIMITER),
|
||||
// ec = formatRecord<Is>(output_buffer, DEFAULT_RECORD_DELIMITER, true)),
|
||||
// ...);
|
||||
// }(std::make_index_sequence<NUMBER_OF_RECORDS>());
|
||||
|
||||
if (!ec) {
|
||||
std::ofstream fst(path, std::ios_base::trunc);
|
||||
if (!fst.is_open()) {
|
||||
|
||||
Reference in New Issue
Block a user