Chris@16: // Boost integer_fwd.hpp header file ---------------------------------------// Chris@16: Chris@16: // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/libs/integer for documentation. Chris@16: Chris@16: #ifndef BOOST_INTEGER_FWD_HPP Chris@16: #define BOOST_INTEGER_FWD_HPP Chris@16: Chris@16: #include // for UCHAR_MAX, etc. Chris@16: #include // for std::size_t Chris@16: Chris@16: #include // for BOOST_NO_INTRINSIC_WCHAR_T Chris@16: #include // for std::numeric_limits Chris@16: #include // For intmax_t Chris@16: Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: Chris@16: #ifdef BOOST_NO_INTEGRAL_INT64_T Chris@16: typedef unsigned long static_log2_argument_type; Chris@16: typedef int static_log2_result_type; Chris@16: typedef long static_min_max_signed_type; Chris@16: typedef unsigned long static_min_max_unsigned_type; Chris@16: #else Chris@16: typedef boost::uintmax_t static_min_max_unsigned_type; Chris@16: typedef boost::intmax_t static_min_max_signed_type; Chris@16: typedef boost::uintmax_t static_log2_argument_type; Chris@16: typedef int static_log2_result_type; Chris@16: #endif Chris@16: Chris@16: // From ------------------------------------------------// Chris@16: Chris@16: // Only has typedefs or using statements, with #conditionals Chris@16: Chris@16: Chris@16: // From -----------------------------------------// Chris@16: Chris@16: template < class T > Chris@16: class integer_traits; Chris@16: Chris@16: template < > Chris@16: class integer_traits< bool >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< char >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< signed char >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< unsigned char >; Chris@16: Chris@16: #ifndef BOOST_NO_INTRINSIC_WCHAR_T Chris@16: template < > Chris@16: class integer_traits< wchar_t >; Chris@16: #endif Chris@16: Chris@16: template < > Chris@16: class integer_traits< short >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< unsigned short >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< int >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< unsigned int >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< long >; Chris@16: Chris@16: template < > Chris@16: class integer_traits< unsigned long >; Chris@16: Chris@16: #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) Chris@16: template < > Chris@16: class integer_traits< ::boost::long_long_type>; Chris@16: Chris@16: template < > Chris@16: class integer_traits< ::boost::ulong_long_type >; Chris@16: #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) Chris@16: template < > Chris@16: class integer_traits<__int64>; Chris@16: Chris@16: template < > Chris@16: class integer_traits; Chris@16: #endif Chris@16: Chris@16: Chris@16: // From ------------------------------------------------// Chris@16: Chris@16: template < typename LeastInt > Chris@16: struct int_fast_t; Chris@16: Chris@16: template< int Bits > Chris@16: struct int_t; Chris@16: Chris@16: template< int Bits > Chris@16: struct uint_t; Chris@16: Chris@16: #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) Chris@16: template< boost::long_long_type MaxValue > // maximum value to require support Chris@16: #else Chris@16: template< long MaxValue > // maximum value to require support Chris@16: #endif Chris@16: struct int_max_value_t; Chris@16: Chris@16: #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) Chris@16: template< boost::long_long_type MinValue > // minimum value to require support Chris@16: #else Chris@16: template< long MinValue > // minimum value to require support Chris@16: #endif Chris@16: struct int_min_value_t; Chris@16: Chris@16: #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) Chris@16: template< boost::ulong_long_type MaxValue > // maximum value to require support Chris@16: #else Chris@16: template< unsigned long MaxValue > // maximum value to require support Chris@16: #endif Chris@16: struct uint_value_t; Chris@16: Chris@16: Chris@16: // From -----------------------------------// Chris@16: Chris@16: template < std::size_t Bit > Chris@16: struct high_bit_mask_t; Chris@16: Chris@16: template < std::size_t Bits > Chris@16: struct low_bits_mask_t; Chris@16: Chris@16: template < > Chris@16: struct low_bits_mask_t< ::std::numeric_limits::digits >; Chris@16: Chris@16: // From ------------------------------------// Chris@16: Chris@16: template Chris@16: struct static_log2; Chris@16: Chris@16: template <> struct static_log2<0u>; Chris@16: Chris@16: Chris@16: // From ---------------------------------// Chris@16: Chris@16: template Chris@16: struct static_signed_min; Chris@16: Chris@16: template Chris@16: struct static_signed_max; Chris@16: Chris@16: template Chris@16: struct static_unsigned_min; Chris@16: Chris@16: template Chris@16: struct static_unsigned_max; Chris@16: Chris@101: Chris@101: // From Chris@101: Chris@101: #ifdef BOOST_NO_INTEGRAL_INT64_T Chris@101: typedef unsigned long static_gcd_type; Chris@101: #else Chris@101: typedef boost::uintmax_t static_gcd_type; Chris@101: #endif Chris@101: Chris@101: template < static_gcd_type Value1, static_gcd_type Value2 > Chris@101: struct static_gcd; Chris@101: template < static_gcd_type Value1, static_gcd_type Value2 > Chris@101: struct static_lcm; Chris@101: Chris@101: Chris@101: // From Chris@101: Chris@101: template < typename IntegerType > Chris@101: class gcd_evaluator; Chris@101: template < typename IntegerType > Chris@101: class lcm_evaluator; Chris@101: Chris@101: Chris@16: } // namespace boost Chris@16: Chris@16: Chris@16: #endif // BOOST_INTEGER_FWD_HPP