std: add usize and isize typedefs

This commit is contained in:
Danny Robson 2024-11-11 12:00:50 +10:00
parent e3ab977ffa
commit 5eea1f4f40

View File

@ -9,6 +9,7 @@
#pragma once
#include <cstdint>
#include <cstddef>
/// A collection of convenience typedefs that define short aliases (three
/// letters) to std sized types in the global namespace.
@ -50,3 +51,8 @@ using f64 = double;
//-----------------------------------------------------------------------------
static_assert (sizeof (f32) == 4);
static_assert (sizeof (f64) == 8);
///////////////////////////////////////////////////////////////////////////////
using isize = std::ptrdiff_t;
using usize = std::size_t;