Skip to content

Commit

Permalink
Merge pull request #48 from TGSAI/fix_variable_template
Browse files Browse the repository at this point in the history
fix: error + warning
  • Loading branch information
BrianMichell authored Jul 30, 2024
2 parents 95e118c + e26aecf commit 937d17b
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions mdio/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -1040,7 +1039,7 @@ class Variable {
*/
template <typename T_attrs = float>
Result<void> UpdateAttributes(const nlohmann::json& newAttrs) {
auto res = (*attributes)->FromJson<T_attrs>(newAttrs);
auto res = (*attributes)->template FromJson<T_attrs>(newAttrs);
if (res.status().ok()) {
// Create a new UserAttributes object and update the inner std::shared_ptr
*attributes = std::make_shared<UserAttributes>(res.value());
Expand Down

0 comments on commit 937d17b

Please sign in to comment.