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/mpl/assert.hpp>
9
10int main()
11 {
12
13 // You can always instantiate without compiler errors
14
15 BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(someFunctionMemberTemplate)<AnotherType,int,boost::mpl::vector<float,long,bool> > aVar;
16
17 // Compile time asserts
18
19 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(SomeFuncTemplate)<AType::BType::CType,double,boost::mpl::vector<int,long *,double &> >));
20 BOOST_MPL_ASSERT((SameName<AType,void,boost::mpl::vector<int *,int,float &> >));
21 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(AFuncTemplate)<AType,int,boost::mpl::vector<const long &> >));
22 BOOST_MPL_ASSERT((AnotherName<AnotherType,long,boost::mpl::vector<bool &> >));
23
24 return 0;
25
26 }
27

source code of boost/libs/tti/test/test_has_mem_fun_template_compile.cpp