From 7dee3b84eea82ef3ca13b79b611d975a48550489 Mon Sep 17 00:00:00 2001 From: Steven WdV <> Date: Tue, 16 Jan 2024 13:31:52 +0100 Subject: [PATCH] Fix C++20 compatibility Closes ReactiveX#602 --- Rx/v2/src/rxcpp/rx-util.hpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Rx/v2/src/rxcpp/rx-util.hpp b/Rx/v2/src/rxcpp/rx-util.hpp index cde8ea86c..cf641812e 100644 --- a/Rx/v2/src/rxcpp/rx-util.hpp +++ b/Rx/v2/src/rxcpp/rx-util.hpp @@ -996,22 +996,16 @@ struct filtered_hash::value>::type> }; template struct filtered_hash>::value>::type> { - using argument_type = T; - using result_type = std::size_t; - - result_type operator()(argument_type const & dur) const + std::size_t operator()(T const & dur) const { - return std::hash{}(dur.count()); + return std::hash{}(dur.count()); } }; template struct filtered_hash>::value>::type> { - using argument_type = T; - using result_type = std::size_t; - - result_type operator()(argument_type const & tp) const + std::size_t operator()(T const & tp) const { - return std::hash{}(tp.time_since_epoch().count()); + return std::hash{}(tp.time_since_epoch().count()); } }; @@ -1022,8 +1016,6 @@ struct is_hashable template struct is_hashable::result_type, - typename filtered_hash::argument_type, typename rxu::callable_result, T>::type>::type> : std::true_type {};