From 03dd13ef23d2ba329c017a2b35df65dfd5a7e091 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 29 Mar 2022 08:38:42 -0500 Subject: [PATCH] Use safer, but slower, select_last_t for msvc. --- src/engine/function.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/engine/function.cpp b/src/engine/function.cpp index bca018c4d..ca7010c65 100644 --- a/src/engine/function.cpp +++ b/src/engine/function.cpp @@ -239,6 +239,17 @@ namespace >::type >::type; + #if 1 + template + struct select_last_impl {}; + template + struct select_last_impl { using type = T; }; + template + struct select_last_impl { + using type = typename select_last_impl::type; }; + template + using select_last_t = typename select_last_impl::type; + #else template struct type_list; template @@ -261,6 +272,7 @@ namespace using select_last_t = typename select_last_impl<(sizeof...(A) == 1), type_list > ::template type; + #endif } struct _stack