![]() |
The ZX Ecosystem v5.1.0;_GUI_v3.1.0
|
LongestType provides the longest type in memory of 2 other given types. The given types must not necessarily be basic types (it also works with classes).
Usage:
typedef LongestType< yourtype0, yourtype1, (sizeof(yourtype0) < sizeof(yourtype1)) >::type YourLongestType;
Classes | |
class | LongestType< T0, T1, sizet0smallerthansizet1 > |
Select the longest type in memory of two given types T0 and T1. More... | |
class | LongestType< T0, T1, true > |
Case of sizeof(T0) < sizeof(T1) More... | |
Typedefs | |
using | LongestUnsignedType = unsigned long long |
Longest unsigned integral type in the target machine. More... | |
class LongestType |
Select the longest type in memory of two given types T0 and T1.
This is the case of sizeof(T0) >= sizeof(T1)
Definition at line 339 of file CppAddons.h.
Public Types | |
typedef T0 | type |
Longest type of both. More... | |
typedef T0 LongestType< T0, T1, sizet0smallerthansizet1 >::type |
Longest type of both.
Definition at line 343 of file CppAddons.h.
class LongestType< T0, T1, true > |
Case of sizeof(T0) < sizeof(T1)
Definition at line 348 of file CppAddons.h.
Public Types | |
typedef T1 | type |
Longest type of both. More... | |
typedef T1 LongestType< T0, T1, true >::type |
Longest type of both.
Definition at line 352 of file CppAddons.h.
using LongestUnsignedType = unsigned long long |
#include <CppAddons.h>
Longest unsigned integral type in the target machine.
This type is useful, for example, to receive an integral argument that can have any length. For indicating a size in memory, use size_t instead: the standard states, in fact, that any object in memory that occupies more than size_t is ill formed.
Definition at line 367 of file CppAddons.h.