From 0f1fff7ac8070635e2efa00c50bfab99d46c7e66 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 1 Nov 2023 22:50:49 +0100 Subject: [PATCH] test: use shared transparent_equal_to type --- test/entt/container/dense_map.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/test/entt/container/dense_map.cpp b/test/entt/container/dense_map.cpp index d2b1abb77..fadb7e677 100644 --- a/test/entt/container/dense_map.cpp +++ b/test/entt/container/dense_map.cpp @@ -15,19 +15,10 @@ #include "../common/config.h" #include "../common/throwing_allocator.hpp" #include "../common/tracked_memory_resource.hpp" - -struct transparent_equal_to { - using is_transparent = void; - - template - constexpr std::enable_if_t, bool> - operator()(const Type &lhs, const Other &rhs) const { - return lhs == static_cast(rhs); - } -}; +#include "../common/transparent_equal_to.h" TEST(DenseMap, Functionalities) { - entt::dense_map map; + entt::dense_map map; const auto &cmap = map; ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = map.get_allocator()); @@ -927,7 +918,7 @@ TEST(DenseMap, Swap) { } TEST(DenseMap, EqualRange) { - entt::dense_map map; + entt::dense_map map; const auto &cmap = map; map.emplace(42, 3);