2001-12-03 23:55:35 +00:00
|
|
|
// Boost integer_fwd.hpp header file ---------------------------------------//
|
|
|
|
|
2004-08-15 10:13:49 +00:00
|
|
|
// (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost
|
2004-08-11 10:59:33 +00:00
|
|
|
// Software License, Version 1.0. (See accompanying file
|
|
|
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
2001-12-03 23:55:35 +00:00
|
|
|
|
2002-12-27 16:51:53 +00:00
|
|
|
// See http://www.boost.org/libs/integer for documentation.
|
2001-12-03 23:55:35 +00:00
|
|
|
|
|
|
|
#ifndef BOOST_INTEGER_FWD_HPP
|
|
|
|
#define BOOST_INTEGER_FWD_HPP
|
|
|
|
|
|
|
|
#include <climits> // for UCHAR_MAX, etc.
|
|
|
|
#include <cstddef> // for std::size_t
|
|
|
|
|
2008-07-14 06:28:54 +00:00
|
|
|
#include <boost/config.hpp> // for BOOST_NO_INTRINSIC_WCHAR_T
|
|
|
|
#include <boost/cstdint.hpp> // for boost::uintmax_t, intmax_t
|
|
|
|
#include <boost/limits.hpp> // for std::numeric_limits
|
2001-12-03 23:55:35 +00:00
|
|
|
|
2008-07-24 11:43:02 +00:00
|
|
|
#include <boost/detail/extended_integer.hpp> // for BOOST_HAS_XINT, etc.
|
|
|
|
|
2001-12-03 23:55:35 +00:00
|
|
|
|
|
|
|
namespace boost
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
// From <boost/cstdint.hpp> ------------------------------------------------//
|
|
|
|
|
|
|
|
// Only has typedefs or using statements, with #conditionals
|
|
|
|
|
2008-07-14 06:28:54 +00:00
|
|
|
// ALERT: the forward declarations of items in <boost/integer.hpp> need items
|
|
|
|
// from this header. That means that <boost/cstdint.hpp> cannot #include this
|
|
|
|
// forwarding header, to avoid infinite recursion! One day, maybe
|
|
|
|
// boost::uintmax_t and boost::intmax_t could be segregated into their own
|
|
|
|
// header file (which can't #include this header), <boost/integer.hpp> will use
|
|
|
|
// that header, and <boost/cstdint.hpp> could refer to <boost/integer.hpp>.
|
|
|
|
|
2001-12-03 23:55:35 +00:00
|
|
|
|
|
|
|
// From <boost/integer_traits.hpp> -----------------------------------------//
|
|
|
|
|
|
|
|
template < class T >
|
|
|
|
class integer_traits;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< bool >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< char >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< signed char >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< unsigned char >;
|
|
|
|
|
|
|
|
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
|
|
|
template < >
|
|
|
|
class integer_traits< wchar_t >;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< short >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< unsigned short >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< int >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< unsigned int >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< long >;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
class integer_traits< unsigned long >;
|
|
|
|
|
2008-07-24 11:43:02 +00:00
|
|
|
#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && BOOST_HAS_XINT
|
2001-12-03 23:55:35 +00:00
|
|
|
template < >
|
2008-07-24 11:43:02 +00:00
|
|
|
class integer_traits< ::boost::detail::xint_t >;
|
2001-12-03 23:55:35 +00:00
|
|
|
|
|
|
|
template < >
|
2008-07-24 11:43:02 +00:00
|
|
|
class integer_traits< ::boost::detail::uxint_t >;
|
2001-12-03 23:55:35 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// From <boost/integer.hpp> ------------------------------------------------//
|
|
|
|
|
2008-07-15 18:56:59 +00:00
|
|
|
template < typename BaseInt >
|
|
|
|
struct fast_integral;
|
|
|
|
|
2001-12-03 23:55:35 +00:00
|
|
|
template < typename LeastInt >
|
|
|
|
struct int_fast_t;
|
|
|
|
|
2008-07-16 09:55:31 +00:00
|
|
|
template < int Bits, typename Signedness >
|
|
|
|
struct sized_integral;
|
|
|
|
|
2008-07-15 09:59:19 +00:00
|
|
|
template < int Bits, typename Signedness >
|
|
|
|
struct exact_integral;
|
|
|
|
|
2008-07-16 09:55:31 +00:00
|
|
|
template < intmax_t MaxValue >
|
|
|
|
struct maximum_signed_integral;
|
|
|
|
|
|
|
|
template < intmax_t MinValue >
|
|
|
|
struct minimum_signed_integral;
|
|
|
|
|
|
|
|
template < uintmax_t Value >
|
|
|
|
struct maximum_unsigned_integral;
|
|
|
|
|
2001-12-03 23:55:35 +00:00
|
|
|
template< int Bits >
|
|
|
|
struct int_t;
|
|
|
|
|
2008-07-15 09:59:19 +00:00
|
|
|
template< int Bits >
|
|
|
|
struct int_exact_t;
|
|
|
|
|
2001-12-03 23:55:35 +00:00
|
|
|
template< int Bits >
|
|
|
|
struct uint_t;
|
|
|
|
|
2008-07-15 09:59:19 +00:00
|
|
|
template< int Bits >
|
|
|
|
struct uint_exact_t;
|
|
|
|
|
2008-07-14 06:28:54 +00:00
|
|
|
template< intmax_t MaxValue >
|
2001-12-03 23:55:35 +00:00
|
|
|
struct int_max_value_t;
|
|
|
|
|
2008-07-14 06:28:54 +00:00
|
|
|
template< intmax_t MinValue >
|
2001-12-03 23:55:35 +00:00
|
|
|
struct int_min_value_t;
|
|
|
|
|
2008-07-14 06:28:54 +00:00
|
|
|
template< uintmax_t Value >
|
2001-12-03 23:55:35 +00:00
|
|
|
struct uint_value_t;
|
|
|
|
|
|
|
|
|
|
|
|
// From <boost/integer/integer_mask.hpp> -----------------------------------//
|
|
|
|
|
|
|
|
template < std::size_t Bit >
|
|
|
|
struct high_bit_mask_t;
|
|
|
|
|
|
|
|
template < std::size_t Bits >
|
|
|
|
struct low_bits_mask_t;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
struct low_bits_mask_t< ::std::numeric_limits<unsigned char>::digits >;
|
|
|
|
|
|
|
|
#if USHRT_MAX > UCHAR_MAX
|
|
|
|
template < >
|
|
|
|
struct low_bits_mask_t< ::std::numeric_limits<unsigned short>::digits >;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if UINT_MAX > USHRT_MAX
|
|
|
|
template < >
|
|
|
|
struct low_bits_mask_t< ::std::numeric_limits<unsigned int>::digits >;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if ULONG_MAX > UINT_MAX
|
|
|
|
template < >
|
|
|
|
struct low_bits_mask_t< ::std::numeric_limits<unsigned long>::digits >;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// From <boost/integer/static_log2.hpp> ------------------------------------//
|
|
|
|
|
|
|
|
template < unsigned long Value >
|
|
|
|
struct static_log2;
|
|
|
|
|
|
|
|
template < >
|
|
|
|
struct static_log2< 0ul >;
|
|
|
|
|
|
|
|
|
|
|
|
// From <boost/integer/static_min_max.hpp> ---------------------------------//
|
|
|
|
|
|
|
|
template < long Value1, long Value2 >
|
|
|
|
struct static_signed_min;
|
|
|
|
|
|
|
|
template < long Value1, long Value2 >
|
|
|
|
struct static_signed_max;
|
|
|
|
|
|
|
|
template < unsigned long Value1, unsigned long Value2 >
|
|
|
|
struct static_unsigned_min;
|
|
|
|
|
|
|
|
template < unsigned long Value1, unsigned long Value2 >
|
|
|
|
struct static_unsigned_max;
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace boost
|
|
|
|
|
|
|
|
|
|
|
|
#endif // BOOST_INTEGER_FWD_HPP
|