From f54b3ecaa20ea6db2a0c8444fc62dd82ec098e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Thu, 10 Oct 2024 14:22:20 +0200 Subject: [PATCH] bugfix for std::optional hashing --- include/cista/hashing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cista/hashing.h b/include/cista/hashing.h index 58c14fa..3b60f30 100644 --- a/include/cista/hashing.h +++ b/include/cista/hashing.h @@ -123,7 +123,7 @@ struct hashing { } else if constexpr (is_strong_v) { return hashing{}(el.v_, seed); } else if constexpr (detail::is_optional::value) { - return el.has_value() ? 0U : hashing{}(*el); + return el.has_value() ? hashing{}(*el) : 0U; } else { static_assert(has_hash_v || std::is_scalar_v || has_std_hash_v || is_iterable_v ||