1
2 // Copyright 2015 Peter Dimov.
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 //
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8
9
10 #include <boost/core/lightweight_test_trait.hpp>
11 #include <boost/mp11/algorithm.hpp>
12 #include <boost/mp11/list.hpp>
13 #include <type_traits>
14 #include <tuple>
15 #include <utility>
16
17 struct X1 {};
18
main()19 int main()
20 {
21 using boost::mp11::mp_list;
22 using boost::mp11::mp_fill;
23
24 using L1 = mp_list<int, void(), float[]>;
25 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fill<L1, X1>, mp_list<X1, X1, X1>>));
26
27 //
28
29 using L2 = std::tuple<int, char, float>;
30 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fill<L2, X1>, std::tuple<X1, X1, X1>>));
31
32 //
33
34 using L3 = std::pair<char, double>;
35 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_fill<L3, X1>, std::pair<X1, X1>>));
36
37 //
38
39 return boost::report_errors();
40 }
41