• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 Glen Joseph Fernandes
2 // (glenjofe@gmail.com)
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/utility.hpp>
10 #include <boost/mp11/algorithm.hpp>
11 #include <boost/core/lightweight_test_trait.hpp>
12 #include <type_traits>
13 
main()14 int main()
15 {
16     using boost::mp11::mp_valid;
17     using boost::mp11::mp_starts_with;
18     using boost::mp11::mp_list;
19     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with>));
20     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
21         void>));
22     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
23         mp_list<> >));
24     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
25         mp_list<int> >));
26     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
27         void, void>));
28     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
29         mp_list<>, void>));
30     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
31         mp_list<int>, void>));
32     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
33         void, mp_list<> >));
34     BOOST_TEST_TRAIT_FALSE((mp_valid<mp_starts_with,
35         void, mp_list<int> >));
36     BOOST_TEST_TRAIT_TRUE((mp_valid<mp_starts_with,
37         mp_list<>, mp_list<> >));
38     BOOST_TEST_TRAIT_TRUE((mp_valid<mp_starts_with,
39         mp_list<>, mp_list<int> >));
40     BOOST_TEST_TRAIT_TRUE((mp_valid<mp_starts_with,
41         mp_list<int>, mp_list<> >));
42     BOOST_TEST_TRAIT_TRUE((mp_valid<mp_starts_with,
43         mp_list<int>, mp_list<char> >));
44     return boost::report_errors();
45 }
46