std: add usize and isize typedefs
This commit is contained in:
parent
e3ab977ffa
commit
5eea1f4f40
@ -9,6 +9,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
/// A collection of convenience typedefs that define short aliases (three
|
/// A collection of convenience typedefs that define short aliases (three
|
||||||
/// letters) to std sized types in the global namespace.
|
/// letters) to std sized types in the global namespace.
|
||||||
@ -50,3 +51,8 @@ using f64 = double;
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static_assert (sizeof (f32) == 4);
|
static_assert (sizeof (f32) == 4);
|
||||||
static_assert (sizeof (f64) == 8);
|
static_assert (sizeof (f64) == 8);
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
using isize = std::ptrdiff_t;
|
||||||
|
using usize = std::size_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user