From d70897fee4fed3a7309ea5e19efa2b244c12412f Mon Sep 17 00:00:00 2001 From: Jonathan Poelen Date: Sun, 9 Nov 2025 02:16:04 +0100 Subject: [PATCH] optimize mp_map_replace compiler | gcc-15 | clang-20 before | 0:00.39s - 114524K | 0:00.66s - 155888K after | 0:00.38s - 114140K | 0:00.64s - 155184K ```cpp template>> using test = mp_map_replace>; using r1 = mp_transform>; ``` --- include/boost/mp11/map.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index dc49795..0836507 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -46,9 +46,7 @@ template class M, class... U, class T> struct mp_map_replace_ #else - template using _f = mp_if< std::is_same, K>, T, V >; - - using type = mp_if< mp_map_contains, K>, M<_f...>, M >; + using type = mp_if< mp_map_contains, K>, M, K>, T, U >...>, M >; #endif };