1
2 // Copyright 2017 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 #include <boost/mp11/detail/config.hpp>
10
11 #if BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 40800 )
12 # pragma GCC diagnostic ignored "-Wsign-compare"
13 #endif
14
15 #include <boost/mp11/function.hpp>
16 #include <boost/mp11/integral.hpp>
17 #include <boost/core/lightweight_test_trait.hpp>
18 #include <type_traits>
19
main()20 int main()
21 {
22 using boost::mp11::mp_min;
23 using boost::mp11::mp_int;
24 using boost::mp11::mp_size_t;
25
26 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_min<mp_int<1>>, mp_int<1>>));
27 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_min<mp_int<2>, mp_int<1>, mp_int<2>, mp_int<3>>, mp_int<1>>));
28 BOOST_TEST_TRAIT_TRUE((std::is_same<mp_min<mp_int<-1>, mp_size_t<1>, mp_int<-2>, mp_size_t<2>>, mp_int<-2>>));
29
30 return boost::report_errors();
31 }
32