50 template <
typename KeyType,
typename ValueType>
64 TPair(
const KeyType& InKey,
const ValueType& InValue) :
Key(InKey),
Value(InValue) {}
95 return !(*
this == Other);
117 return Other < *
this;
128 return !(Other < *
this);
139 return !(*
this < Other);
148 std::cout <<
"Key: " <<
Key <<
", Value: " <<
Value << std::endl;
Clase TPair para representar un par de valores.
KeyType Key
Clave del par.
ValueType Value
Valor del par.
bool operator==(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si son iguales.
bool operator>(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si el par actual es mayor que el otro.
bool operator<=(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si el par actual es menor o igual al otro.
TPair()
Constructor por defecto que inicializa el par con valores predeterminados.
void Print() const
Imprime el par en la consola.
bool operator>=(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si el par actual es mayor o igual al otro.
bool operator!=(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si son diferentes.
TPair(const KeyType &InKey, const ValueType &InValue)
Constructor que inicializa el par con los valores especificados.
bool operator<(const TPair< KeyType, ValueType > &Other) const
Compara dos pares para verificar si el par actual es menor que el otro.