diff --git a/include/small/detail/container/associative_vector.hpp b/include/small/detail/container/associative_vector.hpp index f8cc9b2..82c218a 100644 --- a/include/small/detail/container/associative_vector.hpp +++ b/include/small/detail/container/associative_vector.hpp @@ -902,7 +902,7 @@ namespace small::detail { std::enable_if_t, size_type> count(const K &x) const { if constexpr (!IsMulti) { - return find(x) != end() ? 1 : 0; + return contains(x) ? 1 : 0; } if constexpr (IsOrdered) { @@ -925,7 +925,7 @@ namespace small::detail { template std::enable_if_t, bool> contains(const K &x) const { - return count(x) > 0; + return find(x) != end(); } /// \brief Check if elements with a given key exists