diff --git a/src/entt/core/utility.hpp b/src/entt/core/utility.hpp index af8b5bd96..3ee6bfca6 100644 --- a/src/entt/core/utility.hpp +++ b/src/entt/core/utility.hpp @@ -6,23 +6,6 @@ namespace entt { -/*! @brief Identity function object (waiting for C++20). */ -struct identity { - /*! @brief Indicates that this is a transparent function object. */ - using is_transparent = void; - - /** - * @brief Returns its argument unchanged. - * @tparam Type Type of the argument. - * @param value The actual argument. - * @return The submitted value as-is. - */ - template - [[nodiscard]] constexpr Type &&operator()(Type &&value) const noexcept { - return std::forward(value); - } -}; - /** * @brief Constant utility to disambiguate overloaded members of a class. * @tparam Type Type of the desired overload. diff --git a/test/entt/core/utility.cpp b/test/entt/core/utility.cpp index 3ed3e5129..c231cb95e 100644 --- a/test/entt/core/utility.cpp +++ b/test/entt/core/utility.cpp @@ -11,15 +11,6 @@ struct functions { void bar() {} }; -TEST(Identity, Functionalities) { - const entt::identity identity; - int value = 2; - - ASSERT_TRUE(entt::is_transparent_v); - ASSERT_EQ(identity(value), value); - ASSERT_EQ(&identity(value), &value); -} - TEST(Overload, Functionalities) { ASSERT_EQ(entt::overload(&functions::foo), static_cast(&functions::foo)); ASSERT_EQ(entt::overload(&functions::foo), static_cast(&functions::foo));