Skip to content

Instantly share code, notes, and snippets.

@gszauer
Created May 26, 2022 04:16
Embed
What would you like to do?
types.h
#pragma once
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef __int8 i8;
typedef __int16 i16;
typedef __int32 i32;
typedef __int64 i64;
typedef float f32;
typedef double f64;
static_assert (sizeof(u8) == 1, "Size is not correct");
static_assert (sizeof(u16) == 2, "Size is not correct");
static_assert (sizeof(u32) == 4, "Size is not correct");
static_assert (sizeof(u64) == 8, "Size is not correct");
static_assert (sizeof(i8) == 1, "Size is not correct");
static_assert (sizeof(i16) == 2, "Size is not correct");
static_assert (sizeof(i32) == 4, "Size is not correct");
static_assert (sizeof(i64) == 8, "Size is not correct");
static_assert (sizeof(f32) == 4, "Size is not correct");
static_assert (sizeof(f64) == 8, "Size is not correct");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment