mcc_keyvalue.h: add fix to prevent GCC compilation crashing
This commit is contained in:
@@ -411,16 +411,38 @@ public:
|
|||||||
|
|
||||||
std::error_code ec{};
|
std::error_code ec{};
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// to fix GCC compilation crash for the versions < 16
|
||||||
|
#if GCC_VERSION < 160000
|
||||||
|
auto write_rec = [&output_buffer, &rec_delim, &ec, obj_ptr = this]<size_t I = 0>(this auto& self) -> void {
|
||||||
|
#else
|
||||||
auto write_rec = [&output_buffer, &rec_delim, &ec, this]<size_t I = 0>(this auto& self) -> void {
|
auto write_rec = [&output_buffer, &rec_delim, &ec, this]<size_t I = 0>(this auto& self) -> void {
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
if constexpr (I < NUMBER_OF_RECORDS) {
|
if constexpr (I < NUMBER_OF_RECORDS) {
|
||||||
if constexpr (OPOLICY == MccKeyValueHolder::OPOLICY_CHANGED_ONLY) {
|
if constexpr (OPOLICY == MccKeyValueHolder::OPOLICY_CHANGED_ONLY) {
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// to fix GCC compilation crash for the versions < 16
|
||||||
|
#if GCC_VERSION < 160000
|
||||||
|
if (obj_ptr->_changedKey.count(obj_ptr->_hashes[I]) == 0) {
|
||||||
|
#else
|
||||||
if (_changedKey.count(_hashes[I]) == 0) {
|
if (_changedKey.count(_hashes[I]) == 0) {
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
self.template operator()<I + 1>();
|
self.template operator()<I + 1>();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ec = formatRecord<I>(output_buffer, rec_delim);
|
ec = formatRecord<I>(output_buffer, rec_delim);
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// to fix GCC compilation crash for the versions < 16
|
||||||
|
#if GCC_VERSION < 160000
|
||||||
|
ec = obj_ptr->template formatRecord<I>(output_buffer, rec_delim);
|
||||||
|
#else
|
||||||
|
ec = formatRecord<I>(output_buffer, rec_delim);
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
if (ec) {
|
if (ec) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user