From 0ef43f5d57afbc3e95a7f00a2f3976f810d4bf93 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 1 Nov 2023 22:50:37 +0100 Subject: [PATCH] test: shared transparent_equal_to type --- test/entt/common/transparent_equal_to.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/entt/common/transparent_equal_to.h diff --git a/test/entt/common/transparent_equal_to.h b/test/entt/common/transparent_equal_to.h new file mode 100644 index 000000000..80723625e --- /dev/null +++ b/test/entt/common/transparent_equal_to.h @@ -0,0 +1,20 @@ +#ifndef ENTT_COMMON_TRANSPARENT_EQUAL_TO_HPP +#define ENTT_COMMON_TRANSPARENT_EQUAL_TO_HPP + +#include + +namespace test { + +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); + } +}; + +} // namespace test + +#endif