From 3242fdb1344731cd38b02fae544017da1477031a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 24 Mar 2017 19:12:13 +0200 Subject: [PATCH] Use narrowing instead of static_assert in mp_take --- include/boost/mp11/algorithm.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index e88fe3b..309255c 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -315,16 +315,10 @@ template class L, class T1, class T2, class T3, class T4, cla using type = mp_append, typename mp_take_c_impl, N-5>::type>; }; -template struct mp_take_impl -{ - static_assert( N::value >= 0, "mp_take: N must not be negative" ); - using type = typename mp_take_c_impl::type; -}; - } // namespace detail template using mp_take_c = typename detail::mp_take_c_impl::type; -template using mp_take = typename detail::mp_take_impl::type; +template using mp_take = typename detail::mp_take_c_impl::type; // mp_replace namespace detail