diff --git a/include/boost/mp11/map.hpp b/include/boost/mp11/map.hpp index b9581ac..5141d2e 100644 --- a/include/boost/mp11/map.hpp +++ b/include/boost/mp11/map.hpp @@ -38,11 +38,19 @@ template class M, class... U, class T> struct mp_map_replace_ { using K = mp_first; - // mp_replace_if is inlined here using a struct _f because of msvc-14.0 +#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 ) template struct _f { using type = mp_if< std::is_same, K>, T, V >; }; using type = mp_if< mp_map_contains, K>, M::type...>, M >; + +#else + + template using _f = mp_if< std::is_same, K>, T, V >; + + using type = mp_if< mp_map_contains, K>, M<_f...>, M >; + +#endif }; } // namespace detail