template_int.cpp 829 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2006 Arkadiy Vertleyb
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
  4. #include "test.hpp"
  5. #include <climits>
  6. #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
  7. struct x;
  8. BOOST_TYPEOF_REGISTER_TYPE(x)
  9. template<
  10. class T, char c, unsigned short us, int i, unsigned long ul,
  11. bool b1, bool b2, signed char sc, unsigned u>
  12. struct Tpl
  13. {};
  14. BOOST_TYPEOF_REGISTER_TEMPLATE(Tpl,
  15. (class)
  16. (char)
  17. (unsigned short)
  18. (int)
  19. (unsigned long)
  20. (bool)
  21. (bool)
  22. (signed char)
  23. (unsigned)
  24. )
  25. BOOST_STATIC_ASSERT((boost::type_of::test<Tpl<int, 5, 4, -3, 2, true, false, -1, 5> >::value));
  26. BOOST_STATIC_ASSERT((boost::type_of::test<Tpl<int, 1, 1, 0, ULONG_MAX, false, true, -1, 0> >::value));