| 1 | |
| 2 | // (C) Copyright Edward Diener 2011 |
| 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.hpp" |
| 8 | #include <boost/detail/lightweight_test.hpp> |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | |
| 13 | BOOST_TEST((HaveTheSIntFunction<AType,int,boost::mpl::vector<long,double> >::value)); |
| 14 | BOOST_TEST((!TheTIntFunction<AType,AType,boost::mpl::vector<long,double> >::value)); |
| 15 | BOOST_TEST((TheTIntFunction<AnotherType,AType,boost::mpl::vector<long,double> >::value)); |
| 16 | BOOST_TEST((TheTIntFunction<AnotherType,AType (long,double)>::value)); |
| 17 | BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<AnotherType,AType::AStructType,boost::mpl::vector<AType::AnIntType,double> >::value)); |
| 18 | BOOST_TEST((!Pickedname<AnotherType,void>::value)); |
| 19 | |
| 20 | BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(UnionStaticMemberFunction)<AnotherType::AnotherUnion,void>::value)); |
| 21 | |
| 22 | // Passing non-class enclosing type will return false |
| 23 | |
| 24 | BOOST_TEST((!TheTIntFunction<AnotherType &,AType,boost::mpl::vector<long,double> >::value)); |
| 25 | BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<unsigned,AType::AStructType,boost::mpl::vector<AType::AnIntType,double> >::value)); |
| 26 | |
| 27 | return boost::report_errors(); |
| 28 | |
| 29 | } |
| 30 | |