Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Apr 25, 2024
1 parent ce6d405 commit f78a984
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/boost/histogram/detail/safe_comparison.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ struct safe_equal {

template <class C1, class C2, class T, class U>
bool impl(C1, C2, const T& t, const U& u) const noexcept {
return t == u;
using V = std::common_type<T, U>;
return static_cast<V>(t) == static_cast<V>(u);
}

template <class T, class U>
Expand Down

0 comments on commit f78a984

Please sign in to comment.