From acd0e3e015a95ed7ea01a44f8914854f3b18fcb1 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 21 Jan 2019 06:52:01 +0200 Subject: [PATCH] Test mp_same with 1024 arguments --- include/boost/mp11/detail/mp_count.hpp | 2 +- test/mp_same.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/boost/mp11/detail/mp_count.hpp b/include/boost/mp11/detail/mp_count.hpp index 4bd1953..2daed90 100644 --- a/include/boost/mp11/detail/mp_count.hpp +++ b/include/boost/mp11/detail/mp_count.hpp @@ -72,7 +72,7 @@ namespace detail template class P> struct mp_count_if_impl; -#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) +#if defined( BOOST_MP11_HAS_FOLD_EXPRESSIONS ) && !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 ) template class L, class... T, template class P> struct mp_count_if_impl, P> { diff --git a/test/mp_same.cpp b/test/mp_same.cpp index 5b642ae..d23e6b7 100644 --- a/test/mp_same.cpp +++ b/test/mp_same.cpp @@ -6,8 +6,15 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#include + +#if BOOST_MP11_MSVC +# pragma warning( disable: 4503 ) // decorated name length exceeded +#endif #include +#include +#include #include #include @@ -29,5 +36,16 @@ int main() BOOST_TEST_TRAIT_TRUE((std::is_same, mp_false>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_false>)); + using boost::mp11::mp_repeat_c; + using boost::mp11::mp_list; + using boost::mp11::mp_apply; + + int const N = 1024; + + using L = mp_repeat_c, N>; + using R = mp_apply; + + BOOST_TEST_TRAIT_TRUE((std::is_same)); + return boost::report_errors(); }