diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index babb790..1ee45b2 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -1042,6 +1042,8 @@ template using mp_any_of_q = mp_any_of; namespace detail { +#if ! BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) + template struct mp_replace_at_impl_p { template using _p = std::is_same; @@ -1052,12 +1054,24 @@ template struct mp_replace_at_impl_f template using _f = W; }; +#endif + template struct mp_replace_at_impl { static_assert( I::value >= 0, "mp_replace_at: I must not be negative" ); +#if ! BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 ) + + template using _p = std::is_same>; + template using _f = W; + + using type = mp_transform_if<_p, _f, L, mp_iota > >; + +#else using type = mp_transform_if>::template _p, mp_replace_at_impl_f::template _f, L, mp_iota > >; + +#endif }; } // namespace detail