1// Copyright 2021 Peter Dimov.
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/mp11/detail/config.hpp>
6
7#if BOOST_MP11_MSVC
8# pragma warning( disable: 4503 ) // decorated name length exceeded
9#endif
10
11#include <boost/mp11/function.hpp>
12#include <boost/mp11/integral.hpp>
13#include <boost/mp11/algorithm.hpp>
14#include <boost/core/lightweight_test_trait.hpp>
15#include <type_traits>
16
17int main()
18{
19 using boost::mp11::mp_all;
20
21 using boost::mp11::mp_list;
22 using boost::mp11::mp_apply;
23 using boost::mp11::mp_true;
24 using boost::mp11::mp_false;
25
26 using boost::mp11::mp_repeat_c;
27 using boost::mp11::mp_push_back;
28
29 int const N = 1089;
30
31 using L1 = mp_repeat_c<mp_list<mp_true>, N>;
32 using R1 = mp_apply<mp_all, L1>;
33
34 BOOST_TEST_TRAIT_TRUE((std::is_same<R1, mp_true>));
35
36 using L2 = mp_push_back<L1, mp_false>;
37 using R2 = mp_apply<mp_all, L2>;
38
39 BOOST_TEST_TRAIT_TRUE((std::is_same<R2, mp_false>));
40
41 return boost::report_errors();
42}
43

source code of boost/libs/mp11/test/mp_all_2.cpp