14#ifndef WPIUTIL_WPI_DENSEMAPINFOVARIANT_H
15#define WPIUTIL_WPI_DENSEMAPINFOVARIANT_H
26 using FirstT = std::variant_alternative_t<0, Variant>;
33 return Variant(std::in_place_index<0>,
39 [&Val](
auto &&Alternative) {
44 Val.index(), Alternative);
50 if (LHS.index() != RHS.index())
52 if (LHS.valueless_by_exception())
57 const void *ErasedLHS =
58 std::visit([](
const auto &LHS) ->
const void * {
return &LHS; }, LHS);
60 [&](
const auto &RHS) ->
bool {
This file defines DenseMapInfo traits for DenseMap.
typename std::remove_reference< T >::type remove_reference_t
Definition: core.h:261
typename std::decay< T >::type decay_t
Definition: expected:231
Definition: ntcore_cpp.h:26
std::variant< Ts... > Variant
Definition: DenseMapInfoVariant.h:25
static Variant getTombstoneKey()
Definition: DenseMapInfoVariant.h:32
std::variant_alternative_t< 0, Variant > FirstT
Definition: DenseMapInfoVariant.h:26
static Variant getEmptyKey()
Definition: DenseMapInfoVariant.h:28
static bool isEqual(const Variant &LHS, const Variant &RHS)
Definition: DenseMapInfoVariant.h:49
static unsigned getHashValue(const Variant &Val)
Definition: DenseMapInfoVariant.h:37
An information struct used to provide DenseMap with the various necessary components for a given valu...
Definition: DenseMapInfo.h:50