From 1ec2f3eeb8acdf27e8c85cd2e6cc645fad8342a2 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 18 Dec 2023 10:02:48 +0100 Subject: [PATCH] type_traits: avoid redefining type again and again --- src/entt/core/type_traits.hpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/entt/core/type_traits.hpp b/src/entt/core/type_traits.hpp index 93477742f..62264a51a 100644 --- a/src/entt/core/type_traits.hpp +++ b/src/entt/core/type_traits.hpp @@ -257,12 +257,8 @@ template struct type_list_unique; template -struct type_list_unique, Type...> { - using type = std::conditional_t< - (std::is_same_v || ...), - typename type_list_unique, Type...>::type, - typename type_list_unique, Type..., First>::type>; -}; +struct type_list_unique, Type...> + : std::conditional_t<(std::is_same_v || ...), type_list_unique, Type...>, type_list_unique, Type..., First>> {}; template struct type_list_unique, Type...> {