2022-03-17 01:22:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Miscellaneous/CoreDefines.h"
|
|
|
|
|
2022-05-12 15:36:32 +00:00
|
|
|
#include <typeinfo>
|
|
|
|
#include <initializer_list>
|
|
|
|
|
2022-03-17 01:22:48 +00:00
|
|
|
NAMESPACE_REDCRAFT_BEGIN
|
|
|
|
NAMESPACE_MODULE_BEGIN(Redcraft)
|
|
|
|
NAMESPACE_MODULE_BEGIN(Utility)
|
|
|
|
|
2022-03-19 15:07:04 +00:00
|
|
|
#define NORETURN [[noreturn]]
|
|
|
|
#define CARRIES_DEPENDENCY [[carries_dependency]]
|
|
|
|
#define DEPRECATED(Message) [[deprecated(Message)]]
|
|
|
|
#define FALLTHROUGH [[fallthrough]]
|
2022-04-03 14:55:17 +00:00
|
|
|
#define NODISCARD [[nodiscard]]
|
2022-03-19 15:07:04 +00:00
|
|
|
#define MAYBE_UNUSED [[maybe_unused]]
|
|
|
|
#define LIKELY [[likely]]
|
|
|
|
#define UNLIKELY [[unlikely]]
|
|
|
|
#define NO_UNIQUE_ADDRESS [[no_unique_address]]
|
|
|
|
|
2022-03-17 01:22:48 +00:00
|
|
|
constexpr size_t INDEX_NONE = -1;
|
|
|
|
|
|
|
|
struct FForceInit { explicit FForceInit() = default; };
|
|
|
|
struct FNoInit { explicit FNoInit() = default; };
|
|
|
|
struct FInvalid { explicit FInvalid() = default; };
|
|
|
|
struct FInPlace { explicit FInPlace() = default; };
|
|
|
|
|
|
|
|
inline constexpr FForceInit ForceInit{ };
|
|
|
|
inline constexpr FNoInit NoInit{ };
|
|
|
|
inline constexpr FInvalid Invalid{ };
|
|
|
|
inline constexpr FInPlace InPlace{ };
|
|
|
|
|
|
|
|
template <typename T> struct TInPlaceType { explicit TInPlaceType() = default; };
|
|
|
|
template <size_t I> struct TInPlaceIndex { explicit TInPlaceIndex() = default; };
|
|
|
|
|
|
|
|
template <typename T> inline constexpr TInPlaceType<T> InPlaceType{ };
|
|
|
|
template <size_t I> inline constexpr TInPlaceIndex<I> InPlaceIndex{ };
|
|
|
|
|
2022-05-12 15:36:32 +00:00
|
|
|
using type_info = NAMESPACE_STD::type_info;
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
using initializer_list = NAMESPACE_STD::initializer_list<T>;
|
|
|
|
|
2022-03-17 01:22:48 +00:00
|
|
|
NAMESPACE_MODULE_END(Utility)
|
|
|
|
NAMESPACE_MODULE_END(Redcraft)
|
|
|
|
NAMESPACE_REDCRAFT_END
|