test_vm_has_template_cp_compile.cpp 999 B

12345678910111213141516171819202122232425262728293031323334
  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_vm_has_template_cp.hpp"
  6. #include <boost/mpl/assert.hpp>
  7. int main()
  8. {
  9. #if BOOST_PP_VARIADICS
  10. // You can always instantiate without compiler errors
  11. BOOST_TTI_HAS_TEMPLATE_GEN(TemplateNotExist)<AnotherType> aVar1;
  12. // Compile time asserts
  13. BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(ATPMemberTemplate)<AType>));
  14. BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(AMemberTemplate)<AType>));
  15. BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(SomeMemberTemplate)<AnotherType>));
  16. BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(SimpleTMP)<AnotherType>));
  17. BOOST_MPL_ASSERT((HaveCL<AType>));
  18. BOOST_MPL_ASSERT((HaveAnotherMT<AType>));
  19. BOOST_MPL_ASSERT((ATemplateWithParms<AnotherType>));
  20. #endif // BOOST_PP_VARIADICS
  21. return 0;
  22. }