diff --git a/include/mcc/mcc_keyvalue.h b/include/mcc/mcc_keyvalue.h index 036ff9a..aa5384c 100644 --- a/include/mcc/mcc_keyvalue.h +++ b/include/mcc/mcc_keyvalue.h @@ -411,7 +411,7 @@ public: std::error_code ec{}; - auto write_rec = [&output_buffer, &rec_delim, &ec, this](this auto& self) { + auto write_rec = [&output_buffer, &rec_delim, &ec, this](this auto& self) -> void { if constexpr (I < NUMBER_OF_RECORDS) { if constexpr (OPOLICY == MccKeyValueHolder::OPOLICY_CHANGED_ONLY) { if (_changedKey.count(_hashes[I]) == 0) { @@ -425,41 +425,6 @@ public: return; } - // using val_t = std::remove_cvref_t(_keyValue).value)>; - - // auto key = std::get(_keyValue).key; - - // std::string buff; - // auto err = - // MccSerializer{}(buff, std::get(_keyValue).value, std::get(_keyValue).serial_pars); - // if (err) { - // ec = MccKeyValueHolderErrorCode::ERROR_SERIAL; - // return; - // } else { - // size_t hash = _hashes[I]; - // // write head comment - // if (_headComment[hash].size()) { - // for (auto const& comm : _headComment[hash]) { - // if (comm.has_value()) { - // std::format_to(std::back_inserter(output_buffer), "{}{}", COMM_SEQ, comm.value()); - // } - // std::ranges::copy(rec_delim, std::back_inserter(output_buffer)); - // } - // } - - // // key and value - // std::format_to(std::back_inserter(output_buffer), "{}{}{}", key, KEY_VALUE_DELIM, buff); - - // // inline comment - // if (_inlineComment[hash].size()) { - // std::format_to(std::back_inserter(output_buffer), " {}{}", COMMENT_SEQ, - // _inlineComment[hash]); - // } - - // // record delimiter - // std::ranges::copy(rec_delim, std::back_inserter(output_buffer)); - // } - self.template operator()(); } };