test_has_template_cp.cpp 1.1 KB

123456789101112131415161718192021222324252627282930
  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_template_cp.hpp"
  6. #include <boost/detail/lightweight_test.hpp>
  7. int main()
  8. {
  9. BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(ATPMemberTemplate)<AType>::value);
  10. BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(AMemberTemplate)<AType>::value);
  11. BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(SomeMemberTemplate)<AnotherType>::value);
  12. BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_GEN(SimpleTMP)<AnotherType>::value);
  13. BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_GEN(TemplateNotExist)<AnotherType>::value);
  14. BOOST_TEST(HaveCL<AType>::value);
  15. BOOST_TEST(HaveAnotherMT<AType>::value);
  16. BOOST_TEST(ATemplateWithParms<AnotherType>::value);
  17. // Passing non-class enclosing type will return false
  18. BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_GEN(AMemberTemplate)<unsigned char>::value);
  19. BOOST_TEST(!HaveAnotherMT<AType *>::value);
  20. return boost::report_errors();
  21. }