Skip to content

Commit

Permalink
fixing a slightly incorrect conversion from boost::get to std::get (
Browse files Browse the repository at this point in the history
  • Loading branch information
eteran authored Jan 17, 2025
1 parent 61a960e commit 668a1b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Interpreter/DataValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ inline bool is_array(const DataValue &dv) {

inline std::string to_string(const DataValue &dv) {

if (auto n = std::get<int>(dv.value)) {
return std::to_string(n);
if (auto n = std::get_if<int>(&dv.value)) {
return std::to_string(*n);
}
return std::get<std::string>(dv.value);
}
Expand Down

0 comments on commit 668a1b5

Please sign in to comment.