Integer Types
-
namespace gba
Typedefs
-
template<unsigned Bits>
struct int_type - #include <int_type.hpp>
Signed integer types
- tparam Bits
minimum size of this integer type in bits
Public Types
-
using type = typename std::conditional<Bits <= 8, std::int8_t, typename std::conditional<Bits <= 16, std::int16_t, typename std::conditional<Bits <= 32, std::int32_t, std::int64_t>::type>::type>::type
Exact-width integer type.
Public Static Functions
-
static inline constexpr auto min() noexcept
Smallest possible value to be stored in this type
- Returns
-(2^(Bits-1))
-
static inline constexpr auto max() noexcept
Largest possible value to be stored in this type
- Returns
(2^(Bits-1))-1
-
template<unsigned int Bits>
struct uint_type - #include <int_type.hpp>
Unsigned integer types
- tparam Bits
minimum size of this integer type in bits
Public Types
-
using type = typename std::conditional<Bits <= 8, std::uint8_t, typename std::conditional<Bits <= 16, std::uint16_t, typename std::conditional<Bits <= 32, std::uint32_t, std::uint64_t>::type>::type>::type
Exact-width integer type.
Public Static Functions
-
static inline constexpr auto min() noexcept
Smallest possible value to be stored in this type
- Returns
0
-
static inline constexpr auto max() noexcept
Largest possible value to be stored in this type
- Returns
(2^Bits)-1
-
template<unsigned Bits>