• 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_fun_template.hpp"
8 #include <boost/mpl/assert.hpp>
9 
main()10 int main()
11   {
12 
13   // You can always instantiate without compiler errors
14 
15   Sftem<AType,double,boost::mpl::vector<int,unsigned *,float &> > aVar;
16   BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(Nonexistent)<AType,int,boost::mpl::vector<short,bool,int> > aVar2;
17   NotExist<AnotherType,AType,boost::mpl::vector<long,char> > aVar3;
18   BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(StatFuncTemplate)<AType::AStructType,int,boost::mpl::vector<int *,bool>,boost::function_types::const_qualified> aVar4;
19 
20   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(StatFuncTemplate)<AType::AStructType,int,boost::mpl::vector<int *,bool> >));
21   BOOST_MPL_ASSERT((Sftem<AType::BType::CType,double,boost::mpl::vector<char,unsigned *,float &> >));
22   BOOST_MPL_ASSERT((AnFT<AType,int,boost::mpl::vector<const unsigned &> >));
23   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(AFuncTemplate)<AType,void,boost::mpl::vector<double *,unsigned char,int &> >));
24   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(FTHasDef)<AType,double,boost::mpl::vector<int, long, char> >));
25   BOOST_MPL_ASSERT((ACFunTem<AType,double,boost::mpl::vector<unsigned,int>,boost::function_types::const_qualified>));
26   BOOST_MPL_ASSERT((WConstFT<AType,void,boost::mpl::vector<int **, long &, unsigned long>,boost::function_types::const_qualified>));
27   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(AVolatileFT)<AType,double,boost::mpl::vector<int, long, char>,boost::function_types::volatile_qualified>));
28   BOOST_MPL_ASSERT((VTempl<AType,void,boost::mpl::vector<int &>,boost::function_types::volatile_qualified>));
29   BOOST_MPL_ASSERT((ACVF<AType,double,boost::mpl::vector<int,long>,boost::function_types::cv_qualified>));
30   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(ConstVolTTFun)<AType,void,boost::mpl::vector<float,double>,boost::function_types::cv_qualified>));
31   BOOST_MPL_ASSERT((AnotherFT<AType,void,boost::mpl::vector<int,long &,const bool &> >));
32 
33   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(MyFuncTemplate)<AnotherType,long,boost::mpl::vector<unsigned char &> >));
34   BOOST_MPL_ASSERT((VWDef<AnotherType,void,boost::mpl::vector<float,double>,boost::function_types::volatile_qualified>));
35   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(YetAnotherFuncTemplate)<AnotherType,void,boost::mpl::vector<const int &,unsigned char &> >));
36   BOOST_MPL_ASSERT((BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN(StaticFTWithDefault)<AnotherType,void,boost::mpl::vector<const long &,int &,long *,long> >));
37 
38   return 0;
39 
40   }
41