qxLib
typedefs.h
Go to the documentation of this file.
1 /**
2 
3  @file typedefs.h
4  @author Khrapov
5  @date 18.06.2019
6  @copyright © Nick Khrapov, 2021. All right reserved.
7 
8 **/
9 #pragma once
10 
11 #include <cmath>
12 #include <cstdint>
13 
14 //!< 1 or 2 bytes for pointer arithmetic
15 using mem_t = char*;
16 
17 //!< 0 .. 255
18 using u8 = std::uint8_t;
19 //!< 0 .. 65 535
20 using u16 = std::uint16_t;
21 //!< 0 .. 4 294 967 295
22 using u32 = std::uint32_t;
23 //!< 0 .. 18 446 744 073 709 551 615
24 using u64 = std::uint64_t;
25 
26 //!< - 128 .. 127
27 using i8 = std::int8_t;
28 //!< – 32 768 .. 32 767
29 using i16 = std::int16_t;
30 //!< − 2 147 483 648 .. 2 147 483 647
31 using i32 = std::int32_t;
32 //!< − 9 223 372 036 854 775 808 .. 9 223 372 036 854 775 807
33 using i64 = std::int64_t;
34 
35 
36 using f32 = std::float_t;
37 using f64 = std::double_t;
std::int8_t i8
– 32 768 .. 32 767
Definition: typedefs.h:28
char * mem_t
0 .. 255
Definition: typedefs.h:17
std::uint8_t u8
0 .. 65 535
Definition: typedefs.h:19
std::uint32_t u32
0 .. 18 446 744 073 709 551 615
Definition: typedefs.h:23
std::uint64_t u64
Definition: typedefs.h:26
std::uint16_t u16
0 .. 4 294 967 295
Definition: typedefs.h:21
std::int16_t i16
− 2 147 483 648 .. 2 147 483 647
Definition: typedefs.h:30
std::int32_t i32
− 9 223 372 036 854 775 808 .. 9 223 372 036 854 775 807
Definition: typedefs.h:32