2023-11-19 20:21:56 -05:00
|
|
|
// Copyright 2023 The LightningBolt Authors
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2023-11-19 06:19:15 -05:00
|
|
|
//! Core types and includes
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <memory>
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
// these are in the global namespace since most libraries
|
|
|
|
// won't try defining anything like this in the global namespace
|
|
|
|
// (and I'd like these types to be used globally a lot more anyways)
|
|
|
|
using u8 = std::uint8_t;
|
|
|
|
using i8 = std::int8_t;
|
|
|
|
using u16 = std::uint16_t;
|
|
|
|
using i16 = std::int16_t;
|
|
|
|
using u32 = std::uint32_t;
|
|
|
|
using i32 = std::int32_t;
|
|
|
|
using u64 = std::uint64_t;
|
|
|
|
using i64 = std::int64_t;
|
|
|
|
using usize = std::size_t;
|
|
|
|
using isize = std::intptr_t;
|
|
|
|
|
|
|
|
namespace lightningbolt {
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
|
|
|
|
template <class T, class Deleter = std::default_delete<T>>
|
|
|
|
using Unique = std::unique_ptr<T, Deleter>;
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
using Ref = std::shared_ptr<T>;
|
|
|
|
|
|
|
|
} // namespace lightningbolt
|