• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 //  (C) Copyright Edward Diener 2019
3 //  Use, modification and distribution are subject to the Boost Software License,
4 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 //  http://www.boost.org/LICENSE_1_0.txt).
6 
7 #include "test_has_mem_fun_template.hpp"
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(SomeFuncTemplate)<AType::BType::CType,double,boost::mpl::vector<int,long *,double &> >::value));
14   BOOST_TEST((SameName<AType,void,boost::mpl::vector<int *,int,float &> >::value));
15   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(AFuncTemplate)<AType,int,boost::mpl::vector<const long &> >::value));
16   BOOST_TEST((AnotherName<AnotherType,long,boost::mpl::vector<bool &> >::value));
17 
18   // Wrong enclosing type
19 
20   BOOST_TEST((!BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(SomeFuncTemplate)<AType::BType,double,boost::mpl::vector<int,long *,double &> >::value));
21 
22   // Wrong return value
23 
24   BOOST_TEST((!SameName<AType,int,boost::mpl::vector<int *,int,float &> >::value));
25 
26   // Mismatched paramaters
27 
28   BOOST_TEST((!BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(AFuncTemplate)<AType,int,boost::mpl::vector<const bool &> >::value));
29 
30   // Invalid enclosing type
31 
32   BOOST_TEST((!AnotherName<int,long,boost::mpl::vector<bool &> >::value));
33 
34   return boost::report_errors();
35 
36   }
37