class
CompressedPair
template<class FirstType, class SecondType, bool = std::is_empty_v<FirstType> && !std::is_final_v<FirstType>>
Inherits:
FirstType
Stores two types, where the first type is guaranteed to have zero size if the type is empty.
This is utilizing optimization for empty types (https://en.cppreference.com/w/cpp/language/ebo), i.e. if the FirstType is an empty type, only takes up size for SecondType.
Public
Methods
GetFirst
constexpr FirstType &GetFirst()
GetSecond
constexpr const SecondType &GetSecond() const
GetFirst
constexpr FirstType &GetFirst()
GetFirst
constexpr const FirstType &GetFirst() const
GetSecond
constexpr SecondType &GetSecond()
GetSecond
constexpr const SecondType &GetSecond() const
Private
Fields
Second
SecondType Second
First
FirstType First
Second
SecondType Second