mirror of
https://github.com/boostorg/mp11.git
synced 2025-08-05 15:34:25 +02:00
Test mp_same with 1024 arguments
This commit is contained in:
@@ -72,7 +72,7 @@ namespace detail
|
||||
|
||||
template<class L, template<class...> 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<template<class...> class L, class... T, template<class...> class P> struct mp_count_if_impl<L<T...>, P>
|
||||
{
|
||||
|
@@ -6,8 +6,15 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
|
||||
#if BOOST_MP11_MSVC
|
||||
# pragma warning( disable: 4503 ) // decorated name length exceeded
|
||||
#endif
|
||||
|
||||
#include <boost/mp11/function.hpp>
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -29,5 +36,16 @@ int main()
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_same<void, void, void, int>, mp_false>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_same<void, void, void, void, int>, 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<mp_list<void>, N>;
|
||||
using R = mp_apply<mp_same, L>;
|
||||
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<R, mp_true>));
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user