Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
MakeSigned.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6
7/**
8 * Traits class which gets the signed version of an integer type.
9 */
10template <typename T>
12{
13 static_assert(sizeof(T) == 0, "Unsupported type in TMakeSigned<T>.");
14};
15
16template <typename T> struct TMakeSigned<const T> { using Type = const typename TMakeSigned<T>::Type; };
17template <typename T> struct TMakeSigned< volatile T> { using Type = volatile typename TMakeSigned<T>::Type; };
18template <typename T> struct TMakeSigned<const volatile T> { using Type = const volatile typename TMakeSigned<T>::Type; };
19
20template <> struct TMakeSigned<int8 > { using Type = int8; };
21template <> struct TMakeSigned<uint8 > { using Type = int8; };
22template <> struct TMakeSigned<int16 > { using Type = int16; };
23template <> struct TMakeSigned<uint16> { using Type = int16; };
24template <> struct TMakeSigned<int32 > { using Type = int32; };
25template <> struct TMakeSigned<uint32> { using Type = int32; };
26template <> struct TMakeSigned<int64 > { using Type = int64; };
27template <> struct TMakeSigned<uint64> { using Type = int64; };