fennec
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1// =====================================================================================================================
2// fennec, a free and open source game engine
3// Copyright © 2025 Medusa Slockbower
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <https://www.gnu.org/licenses/>.
17// =====================================================================================================================
18
30
31#ifndef FENNEC_LANG_TYPES_H
32#define FENNEC_LANG_TYPES_H
33
203
204#include <fennec/lang/detail/_int.h>
205
206namespace fennec
207{
208 // Basic Types =========================================================================================================
209
213
214 using bool_t = bool;
215
216 using byte_t = unsigned char;
217
218 using char_t = char;
219 using schar_t = signed char;
220 using uchar_t = unsigned char;
221
222 using short_t = signed short;
223 using ushort_t = unsigned short;
224
225 using int_t = signed int;
226 using uint_t = unsigned int;
227
228 using long_t = signed long;
229 using ulong_t = unsigned long;
230
231 using llong_t = signed long long;
232 using ullong_t = unsigned long long;
233
234 using float_t = float;
235 using double_t = double;
236
238
239
240
244
245 using nullptr_t = decltype(nullptr);
250 using size_t = size_t;
251 using ptrdiff_t = __PTRDIFF_TYPE__;
252 struct empty_t {};
253
254
255 class undefined_t;
256 template<typename...> using void_t = void;
257
259
260
261 // Sized Arithmetic Types ==============================================================================================
262
266
267 using int8_t = ::int8_t;
268 using int16_t = ::int16_t;
269 using int32_t = ::int32_t;
270 using int64_t = ::int64_t;
271
272 using uint8_t = ::uint8_t;
273 using uint16_t = ::uint16_t;
274 using uint32_t = ::uint32_t;
275 using uint64_t = ::uint64_t;
276
278
279
280
284
285 //using float16_t = _Float16; ///< \brief A half-precision floating-point scalar
286 //using float32_t = _Float32; ///< \brief A single-precision floating-point scalar
287 //using float64_t = _Float64; ///< \brief A double-precision floating-point scalar
288
290
291}
292
293#endif // FENNEC_LANG_TYPES_H
::uint32_t uint32_t
Unsigned 32-bit integer.
Definition types.h:274
::int16_t int16_t
Signed 16-bit integer.
Definition types.h:268
::uint64_t uint64_t
Unsigned 64-bit integer.
Definition types.h:275
unsigned char uchar_t
A type with the size of a char, capable of holding an unsigned 8-bit integer.
Definition types.h:220
intmax_t intmax_t
Maximum Width Signed Integer Type.
Definition types.h:248
intptr_t intptr_t
Signed Integer Capable of Holding a Pointer to void.
Definition types.h:246
unsigned long ulong_t
An unsigned integer type, with a size of at least 32-bits.
Definition types.h:229
signed char schar_t
A type with the size of a char, capable of holding a signed 8-bit integer.
Definition types.h:219
double double_t
A double-precision floating-point type, typically with a size of 64-bits.
Definition types.h:235
decltype(nullptr) nullptr_t
Null Pointer Type.
Definition types.h:245
unsigned char byte_t
A type capable of holding a single byte.
Definition types.h:216
uintmax_t uintmax_t
Maximum Width Unsigned Integer Type.
Definition types.h:249
signed short short_t
A signed short type, capable of holding signed 16-bit integer.
Definition types.h:222
size_t size_t
Unsigned Integer Type Returned By sizeof, sizeof..., and alignof
Definition types.h:250
char char_t
A type capable of holding an ascii value.
Definition types.h:218
bool bool_t
A conditional type.
Definition types.h:214
::int32_t int32_t
Signed 32-bit integer.
Definition types.h:269
unsigned int uint_t
An unsigned integer type, size varies by implementation, but typically 32-bit.
Definition types.h:226
::int64_t int64_t
Signed 64-bit integer.
Definition types.h:270
::uint8_t uint8_t
Unsigned 8-bit integer.
Definition types.h:272
signed int int_t
A signed integer type, size varies by implementation, but typically 32-bit.
Definition types.h:225
uintptr_t uintptr_t
Unsigned Integer Capable of Holding a Pointer to void.
Definition types.h:247
unsigned long long ullong_t
An unsigned integer type, with a size of 64-bits.
Definition types.h:232
unsigned short ushort_t
An unsigned short type, capable of holding an unsigned signed 16-bit integer.
Definition types.h:223
::int8_t int8_t
Signed 8-bit integer.
Definition types.h:267
void void_t
Void type used for SFINAE.
Definition types.h:256
__PTRDIFF_TYPE__ ptrdiff_t
Signed Integer Type Returned by the Subtraction of two Pointers.
Definition types.h:251
signed long long_t
A signed integer type, with a size of at least 32-bits.
Definition types.h:228
signed long long llong_t
A signed integer type, with a size of 64-bits.
Definition types.h:231
::uint16_t uint16_t
Unsigned 16-bit integer.
Definition types.h:273
float float_t
A single-precision floating-point type, typically with a size of 32-bits.
Definition types.h:234