From c059b1ea3fee163f77a213cded35f9246dab6ab8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 24 Mar 2017 19:00:52 +0200 Subject: [PATCH] Use narrowing instead of static_assert in mp_repeat --- include/boost/mp11/algorithm.hpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 0cfafc2..e88fe3b 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -189,17 +189,10 @@ template struct mp_repeat_c_impl using type = L; }; -template struct mp_repeat_impl -{ - static_assert( N::value >= 0, "mp_repeat: N must not be negative" ); - - using type = typename mp_repeat_c_impl::type; -}; - } // namespace detail template using mp_repeat_c = typename detail::mp_repeat_c_impl::type; -template using mp_repeat = typename detail::mp_repeat_impl::type; +template using mp_repeat = typename detail::mp_repeat_c_impl::type; // mp_product namespace detail