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_static_mem_fun_template.hpp"
8#include <boost/detail/lightweight_test.hpp>
9
10int main()
11 {
12
13 BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_GEN(StatFuncTemplate)<AType::AStructType,int(short *,long)>::value));
14 BOOST_TEST((TAnother<AType,void (int,long &,const long &)>::value));
15 BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_GEN(YetAnotherFuncTemplate)<AnotherType,void (const double &,float &)>::value));
16
17 // Wrong enclosing type
18
19 BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_GEN(StatFuncTemplate)<AType,int (short *,long)>::value));
20
21 // Wrong return value
22
23 BOOST_TEST((!TAnother<AType,short (int,long &,const long &)>::value));
24
25 // Mismatched paramaters
26
27 BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_GEN(YetAnotherFuncTemplate)<AnotherType,void (const long &,float &)>::value));
28
29 return boost::report_errors();
30
31 }
32

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