Skip to content

Commit

Permalink
use structured binding
Browse files Browse the repository at this point in the history
  • Loading branch information
arashbm committed Nov 13, 2024
1 parent bc5f8fb commit e0e2697
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/reticula/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ namespace reticula {
*/
template <class T1, class T2, template<typename> class HashStruct>
inline std::size_t unordered_hash(const T1& t1, const T2& t2) {
std::size_t h1, h2;
std::tie(h1, h2) = std::minmax(
auto [h1, h2] = std::minmax(
HashStruct<T1>{}(t1), HashStruct<T2>{}(t2));
return h1 ^ (h2 + RETICULA_UTIL_GOLDEN_RATIO + (h1 << 6) + (h1 >> 2));
}
Expand Down

0 comments on commit e0e2697

Please sign in to comment.