integer_fwd.hpp 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. // Boost integer_fwd.hpp header file ---------------------------------------//
  2. // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
  3. // Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
  5. // See https://www.boost.org/libs/integer for documentation.
  6. #ifndef BOOST_INTEGER_FWD_HPP
  7. #define BOOST_INTEGER_FWD_HPP
  8. #include <climits> // for UCHAR_MAX, etc.
  9. #include <cstddef> // for std::size_t
  10. #include <boost/config.hpp> // for BOOST_NO_INTRINSIC_WCHAR_T
  11. #include <boost/limits.hpp> // for std::numeric_limits
  12. #include <boost/cstdint.hpp> // For intmax_t
  13. namespace boost
  14. {
  15. #ifdef BOOST_NO_INTEGRAL_INT64_T
  16. typedef unsigned long static_log2_argument_type;
  17. typedef int static_log2_result_type;
  18. typedef long static_min_max_signed_type;
  19. typedef unsigned long static_min_max_unsigned_type;
  20. #else
  21. typedef boost::uintmax_t static_min_max_unsigned_type;
  22. typedef boost::intmax_t static_min_max_signed_type;
  23. typedef boost::uintmax_t static_log2_argument_type;
  24. typedef int static_log2_result_type;
  25. #endif
  26. // From <boost/cstdint.hpp> ------------------------------------------------//
  27. // Only has typedefs or using statements, with #conditionals
  28. // From <boost/integer_traits.hpp> -----------------------------------------//
  29. template < class T >
  30. class integer_traits;
  31. template < >
  32. class integer_traits< bool >;
  33. template < >
  34. class integer_traits< char >;
  35. template < >
  36. class integer_traits< signed char >;
  37. template < >
  38. class integer_traits< unsigned char >;
  39. #ifndef BOOST_NO_INTRINSIC_WCHAR_T
  40. template < >
  41. class integer_traits< wchar_t >;
  42. #endif
  43. template < >
  44. class integer_traits< short >;
  45. template < >
  46. class integer_traits< unsigned short >;
  47. template < >
  48. class integer_traits< int >;
  49. template < >
  50. class integer_traits< unsigned int >;
  51. template < >
  52. class integer_traits< long >;
  53. template < >
  54. class integer_traits< unsigned long >;
  55. #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
  56. template < >
  57. class integer_traits< ::boost::long_long_type>;
  58. template < >
  59. class integer_traits< ::boost::ulong_long_type >;
  60. #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
  61. template < >
  62. class integer_traits<__int64>;
  63. template < >
  64. class integer_traits<unsigned __int64>;
  65. #endif
  66. // From <boost/integer.hpp> ------------------------------------------------//
  67. template < typename LeastInt >
  68. struct int_fast_t;
  69. template< int Bits >
  70. struct int_t;
  71. template< int Bits >
  72. struct uint_t;
  73. #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
  74. template< boost::long_long_type MaxValue > // maximum value to require support
  75. #else
  76. template< long MaxValue > // maximum value to require support
  77. #endif
  78. struct int_max_value_t;
  79. #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
  80. template< boost::long_long_type MinValue > // minimum value to require support
  81. #else
  82. template< long MinValue > // minimum value to require support
  83. #endif
  84. struct int_min_value_t;
  85. #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
  86. template< boost::ulong_long_type MaxValue > // maximum value to require support
  87. #else
  88. template< unsigned long MaxValue > // maximum value to require support
  89. #endif
  90. struct uint_value_t;
  91. // From <boost/integer/integer_mask.hpp> -----------------------------------//
  92. template < std::size_t Bit >
  93. struct high_bit_mask_t;
  94. template < std::size_t Bits >
  95. struct low_bits_mask_t;
  96. template < >
  97. struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
  98. // From <boost/integer/static_log2.hpp> ------------------------------------//
  99. template <static_log2_argument_type Value >
  100. struct static_log2;
  101. template <> struct static_log2<0u>;
  102. // From <boost/integer/static_min_max.hpp> ---------------------------------//
  103. template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
  104. struct static_signed_min;
  105. template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
  106. struct static_signed_max;
  107. template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
  108. struct static_unsigned_min;
  109. template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
  110. struct static_unsigned_max;
  111. namespace integer
  112. {
  113. // From <boost/integer/common_factor_ct.hpp>
  114. #ifdef BOOST_NO_INTEGRAL_INT64_T
  115. typedef unsigned long static_gcd_type;
  116. #else
  117. typedef boost::uintmax_t static_gcd_type;
  118. #endif
  119. template < static_gcd_type Value1, static_gcd_type Value2 >
  120. struct static_gcd;
  121. template < static_gcd_type Value1, static_gcd_type Value2 >
  122. struct static_lcm;
  123. // From <boost/integer/common_factor_rt.hpp>
  124. template < typename IntegerType >
  125. class gcd_evaluator;
  126. template < typename IntegerType >
  127. class lcm_evaluator;
  128. } // namespace integer
  129. } // namespace boost
  130. #endif // BOOST_INTEGER_FWD_HPP