From e9698974bdac508f7452adce2372c6081c398482 Mon Sep 17 00:00:00 2001 From: "Nadezhda.Melnikova" Date: Mon, 23 Sep 2024 17:10:11 +0300 Subject: [PATCH] Added float and double handling in gen_util.h --- rd-cpp/src/rd_core_cpp/src/main/util/gen_util.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rd-cpp/src/rd_core_cpp/src/main/util/gen_util.h b/rd-cpp/src/rd_core_cpp/src/main/util/gen_util.h index f189002c6..34d714b6d 100644 --- a/rd-cpp/src/rd_core_cpp/src/main/util/gen_util.h +++ b/rd-cpp/src/rd_core_cpp/src/main/util/gen_util.h @@ -21,7 +21,7 @@ size_t contentHashCode(C const& list) noexcept // TO-DO faster for integrals } -template ::value>> +template ::value>> size_t contentDeepHashCode(T const& value) noexcept { return rd::hash()(value); @@ -31,22 +31,22 @@ template using remove_all_t = std::remove_reference_t>; // optional and rd::Wrapper -template ::value>> +template ::value>> typename std::enable_if_t::value, size_t> contentDeepHashCode(T const& value) noexcept { return rd::hash>()(value); } // containers -template ::value>> -typename std::enable_if_t>::value, size_t> contentDeepHashCode(T const& value) noexcept +template ::value>> +typename std::enable_if_t>::value, size_t> contentDeepHashCode(T const& value) noexcept { return contentHashCode(value); } -// containers of non-integral types -template ::value>> -typename std::enable_if_t>::value, size_t> contentDeepHashCode(T const& value) noexcept +// containers of non-arithmetic types +template ::value>> +typename std::enable_if_t>::value, size_t> contentDeepHashCode(T const& value) noexcept { size_t result = 1; for (auto const& x : value)