From d9c4308d9d96fcbfef3e85af44e1d3f3a95ed686 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 17 Jun 2017 19:14:47 +0300 Subject: [PATCH] Add list_size_mismatch which produces a better error message from mp_transform --- include/boost/mp11/algorithm.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index 996a61f..dbd3ef5 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -117,15 +117,19 @@ template struct mp_same_size_2: mp_defer {}; #endif +struct list_size_mismatch +{ +}; + } // namespace detail #if BOOST_WORKAROUND( BOOST_MSVC, == 1900 ) || BOOST_WORKAROUND( BOOST_GCC, < 40800 ) -template class F, class... L> using mp_transform = typename mp_if::type, detail::mp_transform_impl>::type; +template class F, class... L> using mp_transform = typename mp_if::type, detail::mp_transform_impl, detail::list_size_mismatch>::type; #else -template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl>::type; +template class F, class... L> using mp_transform = typename mp_if...>, detail::mp_transform_impl, detail::list_size_mismatch>::type; #endif