1 
2 // Copyright Bruno Dutra 2015
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // See http://www.boost.org/libs/mpl for documentation.
9 
10 // $Id$
11 // $Date$
12 // $Revision$
13 
14 #define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 15
15 #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
16 
17 #include <boost/mpl/logical.hpp>
18 #include <boost/mpl/placeholders.hpp>
19 #include <boost/mpl/apply.hpp>
20 
21 #include <boost/mpl/aux_/test.hpp>
22 
23 #include <boost/preprocessor/inc.hpp>
24 #include <boost/preprocessor/repeat_from_to.hpp>
25 #include <boost/preprocessor/enum_params.hpp>
26 #include <boost/preprocessor/facilities/intercept.hpp>
27 
28 #define TEST_N_ARY(z, N, unused2) \
29     static_assert_< \
30         apply< \
31             and_<BOOST_PP_ENUM_PARAMS_Z(z, N, _ BOOST_PP_INTERCEPT)>, \
32             BOOST_PP_ENUM_PARAMS_Z(z, N, true_ BOOST_PP_INTERCEPT) \
33         > \
34     >(); \
35 /**/
36 
37 template<typename assertion>
static_assert_()38 void static_assert_(){
39     MPL_ASSERT((typename assertion::type));
40 }
41 
MPL_TEST_CASE()42 MPL_TEST_CASE()
43 {
44     BOOST_PP_REPEAT_FROM_TO(
45         2,
46         BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY),
47         TEST_N_ARY,
48         _
49     )
50 }
51