test_has_static_mem_fun.cpp 1.2 KB

123456789101112131415161718192021222324252627
  1. // (C) Copyright Edward Diener 2011
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #include "test_has_static_mem_fun.hpp"
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. BOOST_TEST((HaveTheSIntFunction<AType,int,boost::mpl::vector<long,double> >::value));
  10. BOOST_TEST((!TheTIntFunction<AType,AType,boost::mpl::vector<long,double> >::value));
  11. BOOST_TEST((TheTIntFunction<AnotherType,AType,boost::mpl::vector<long,double> >::value));
  12. BOOST_TEST((TheTIntFunction<AnotherType,AType (long,double)>::value));
  13. BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<AnotherType,AType::AStructType,boost::mpl::vector<AType::AnIntType,double> >::value));
  14. BOOST_TEST((!Pickedname<AnotherType,void>::value));
  15. // Passing non-class enclosing type will return false
  16. BOOST_TEST((!TheTIntFunction<AnotherType &,AType,boost::mpl::vector<long,double> >::value));
  17. BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<unsigned,AType::AStructType,boost::mpl::vector<AType::AnIntType,double> >::value));
  18. return boost::report_errors();
  19. }