type_traits_test.cpp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // (C) Copyright John Maddock 2010.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/type_traits.hpp>
  6. //
  7. // Just check that each trait actually exists, not
  8. // that it gives the correct answer, we do that elsewhere:
  9. //
  10. typedef boost::add_const<int>::type t1;
  11. typedef boost::add_cv<int>::type t2;
  12. typedef boost::add_lvalue_reference<int>::type t3;
  13. typedef boost::add_pointer<int>::type t4;
  14. typedef boost::add_reference<int>::type t5;
  15. typedef boost::add_rvalue_reference<int>::type t6;
  16. typedef boost::add_volatile<int>::type t7;
  17. typedef boost::aligned_storage<2>::type t8;
  18. typedef boost::alignment_of<int>::type t9;
  19. typedef boost::conditional<true, int, long>::type t10;
  20. typedef boost::common_type<int, long>::type t11;
  21. typedef boost::decay<int[2] >::type t12;
  22. typedef boost::extent<int[3] >::type t13;
  23. typedef boost::floating_point_promotion<int>::type t14;
  24. typedef boost::function_traits<int (int) > t15;
  25. typedef boost::has_new_operator<int> t16;
  26. typedef boost::has_nothrow_assign<int> t17;
  27. typedef boost::has_nothrow_constructor<int> t18;
  28. typedef boost::has_nothrow_copy<int> t19;
  29. typedef boost::has_nothrow_copy_constructor<int> t20;
  30. typedef boost::has_nothrow_default_constructor<int> t21;
  31. typedef boost::has_trivial_assign<int> t22;
  32. typedef boost::has_trivial_constructor<int> t23;
  33. typedef boost::has_trivial_copy<int> t24;
  34. typedef boost::has_trivial_copy_constructor<int> t25;
  35. typedef boost::has_trivial_default_constructor<int> t26;
  36. typedef boost::has_trivial_destructor<int> t27;
  37. typedef boost::has_virtual_destructor<int> t28;
  38. typedef boost::integral_constant<int, 2> t29;
  39. typedef boost::integral_promotion<short>::type t30;
  40. typedef boost::is_abstract<int>::type t31;
  41. typedef boost::is_arithmetic<int>::type t32;
  42. typedef boost::is_array<int>::type t33;
  43. typedef boost::is_base_of<int, long>::type t34;
  44. typedef boost::is_class<int>::type t35;
  45. typedef boost::is_complex<int>::type t36;
  46. typedef boost::is_compound<int>::type t37;
  47. typedef boost::is_const<int>::type t38;
  48. typedef boost::is_convertible<int, long>::type t39;
  49. typedef boost::is_empty<int>::type t40;
  50. typedef boost::is_enum<int>::type t41;
  51. typedef boost::is_floating_point<int>::type t42;
  52. typedef boost::is_function<int>::type t43;
  53. typedef boost::is_fundamental<int>::type t44;
  54. typedef boost::is_integral<int>::type t45;
  55. typedef boost::is_lvalue_reference<int>::type t46;
  56. typedef boost::is_member_function_pointer<int>::type t47;
  57. typedef boost::is_member_object_pointer<int>::type t48;
  58. typedef boost::is_member_pointer<int>::type t49;
  59. typedef boost::is_object<int>::type t50;
  60. typedef boost::is_pod<int>::type t51;
  61. typedef boost::is_pointer<int>::type t52;
  62. typedef boost::is_polymorphic<int>::type t53;
  63. typedef boost::is_reference<int>::type t54;
  64. typedef boost::is_rvalue_reference<int>::type t55;
  65. typedef boost::is_same<int, int>::type t56;
  66. typedef boost::is_scalar<int>::type t57;
  67. typedef boost::is_signed<int>::type t58;
  68. typedef boost::is_stateless<int>::type t59;
  69. typedef boost::is_union<int>::type t60;
  70. typedef boost::is_unsigned<int>::type t61;
  71. typedef boost::is_virtual_base_of<int, int>::type t62;
  72. typedef boost::is_void<int>::type t63;
  73. typedef boost::is_volatile<int>::type t64;
  74. typedef boost::make_signed<int>::type t65;
  75. typedef boost::make_unsigned<int>::type t66;
  76. typedef boost::promote<int>::type t67;
  77. typedef boost::rank<int>::type t68;
  78. typedef boost::remove_all_extents<int>::type t69;
  79. typedef boost::remove_const<int>::type t70;
  80. typedef boost::remove_cv<int>::type t71;
  81. typedef boost::remove_extent<int>::type t72;
  82. typedef boost::remove_pointer<int>::type t73;
  83. typedef boost::remove_reference<int>::type t74;
  84. typedef boost::remove_volatile<int>::type t75;
  85. typedef boost::type_with_alignment<4>::type t76;
  86. int main()
  87. {
  88. return 0;
  89. }