mirror of
https://github.com/boostorg/mp11.git
synced 2026-07-05 08:00:48 +02:00
fix mp_replace_at with msvc-12
This commit is contained in:
@@ -1042,6 +1042,8 @@ template<class L, class Q> using mp_any_of_q = mp_any_of<L, Q::template fn>;
|
||||
namespace detail
|
||||
{
|
||||
|
||||
#if ! BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
|
||||
|
||||
template<class I> struct mp_replace_at_impl_p
|
||||
{
|
||||
template<class T1, class T2> using _p = std::is_same<T2, I>;
|
||||
@@ -1052,12 +1054,24 @@ template<class W> struct mp_replace_at_impl_f
|
||||
template<class T1, class T2> using _f = W;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<class L, class I, class W> struct mp_replace_at_impl
|
||||
{
|
||||
static_assert( I::value >= 0, "mp_replace_at<L, I, W>: I must not be negative" );
|
||||
|
||||
#if ! BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
|
||||
|
||||
template<class T1, class T2> using _p = std::is_same<T2, mp_size_t<I::value>>;
|
||||
template<class T1, class T2> using _f = W;
|
||||
|
||||
using type = mp_transform_if<_p, _f, L, mp_iota<mp_size<L> > >;
|
||||
|
||||
#else
|
||||
|
||||
using type = mp_transform_if<mp_replace_at_impl_p<mp_size_t<I::value>>::template _p, mp_replace_at_impl_f<W>::template _f, L, mp_iota<mp_size<L> > >;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
Reference in New Issue
Block a user