• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 //  (C) Copyright Edward Diener 2012
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.hpp"
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13   // Use const enclosing type
14 
15   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction)<const AType,double,boost::mpl::vector<long,char> >::value));
16   BOOST_TEST((StillTest<const AnotherType,AType,boost::mpl::vector<int> >::value));
17 
18   // Use const_qualified
19 
20   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction)<AnotherType,int,boost::mpl::vector<AType *, short>,boost::function_types::const_qualified>::value));
21   BOOST_TEST((AskIfConst<AType,void,boost::mpl::vector<float,double>,boost::function_types::const_qualified>::value));
22 
23   // Use volatile enclosing type
24 
25   BOOST_TEST((AnVol<volatile AnotherType,int,boost::mpl::vector<AType *,short> >::value));
26   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AVolatileFunction)<volatile AType,double,boost::mpl::vector<long,char> >::value));
27 
28   // Use volatile_qualified
29 
30   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(StillVolatile)<AnotherType,bool,boost::mpl::vector<int>,boost::function_types::volatile_qualified>::value));
31   BOOST_TEST((Volly<AType,void,boost::mpl::vector<float,double>,boost::function_types::volatile_qualified>::value));
32 
33   // Use const volatile enclosing type
34 
35   BOOST_TEST((CVAnother<const volatile AnotherType,int,boost::mpl::vector<AType *,short> >::value));
36   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(StillCV)<const volatile AnotherType,short,boost::mpl::vector<int> >::value));
37 
38   // Use cv_qualified
39 
40   BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(ConstVolFunction)<AType,void,boost::mpl::vector<float,double>,boost::function_types::cv_qualified>::value));
41   BOOST_TEST((CVBoth<AType,double,boost::mpl::vector<long,char>,boost::function_types::cv_qualified>::value));
42 
43   return boost::report_errors();
44 
45   }
46