Skip to content

Commit

Permalink
Try to clean up warnings on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisoi committed Nov 18, 2024
1 parent 07b4e6f commit f86da0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rice/stl/variant.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ namespace Rice::detail
Code inspired by https://www.foonathan.net/2020/05/fold-tricks/ */

VALUE result = Qnil;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
((std::holds_alternative<std::tuple_element_t<I, Tuple_T>>(data) ?
(result = convertElement<std::tuple_element_t<I, Tuple_T>>(data, takeOwnership), true) : false) || ...);
#pragma GCC diagnostic pop

return result;
}
Expand Down Expand Up @@ -91,8 +95,12 @@ namespace Rice::detail

// See comments above for explanation of this code
VALUE result = Qnil;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
((std::holds_alternative<std::tuple_element_t<I, Tuple_T>>(data) ?
(result = convertElement<std::tuple_element_t<I, Tuple_T>>(data, takeOwnership), true) : false) || ...);
#pragma GCC diagnostic pop

return result;
}
Expand Down

0 comments on commit f86da0c

Please sign in to comment.