From e26aecfa708fb080f992f33c3401d7a3f6830ac0 Mon Sep 17 00:00:00 2001 From: blasscoc Date: Tue, 30 Jul 2024 11:59:18 -0500 Subject: [PATCH] fix: error + warning --- mdio/variable.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mdio/variable.h b/mdio/variable.h index a04818e..f773862 100644 --- a/mdio/variable.h +++ b/mdio/variable.h @@ -843,16 +843,15 @@ class Variable { mdio::SliceDescriptor err; std::apply( [&](const auto&... desc) { - size_t idx = 0; - (( - [&] { - if (idx == preconditionStatus) { - err = desc; - } - idx++; - }(), - idx), - ...); + size_t idx = 0; + (( + [&] { + if (idx == preconditionStatus) { + err = desc; + } + idx++; + }() + ), ...); }, tuple_descs); return absl::InvalidArgumentError( @@ -1040,7 +1039,7 @@ class Variable { */ template Result UpdateAttributes(const nlohmann::json& newAttrs) { - auto res = (*attributes)->FromJson(newAttrs); + auto res = (*attributes)->template FromJson(newAttrs); if (res.status().ok()) { // Create a new UserAttributes object and update the inner std::shared_ptr *attributes = std::make_shared(res.value());