WPILibC++ 2024.3.2
wpi::ValueIsPresent< T, Enable > Struct Template Reference

ValueIsPresent provides a way to check if a value is, well, present. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/Casting.h>

Public Types

using UnwrappedType = T
 

Static Public Member Functions

static bool isPresent (const T &t)
 
static decltype(auto) unwrapValue (T &t)
 

Detailed Description

template<typename T, typename Enable = void>
struct wpi::ValueIsPresent< T, Enable >

ValueIsPresent provides a way to check if a value is, well, present.

For pointers, this is the equivalent of checking against nullptr, for Optionals this is the equivalent of checking hasValue(). It also provides a method for unwrapping a value (think calling .value() on an optional).

Member Typedef Documentation

◆ UnwrappedType

template<typename T , typename Enable = void>
using wpi::ValueIsPresent< T, Enable >::UnwrappedType = T

Member Function Documentation

◆ isPresent()

template<typename T , typename Enable = void>
static bool wpi::ValueIsPresent< T, Enable >::isPresent ( const T &  t)
inlinestatic

◆ unwrapValue()

template<typename T , typename Enable = void>
static decltype(auto) wpi::ValueIsPresent< T, Enable >::unwrapValue ( T &  t)
inlinestatic

The documentation for this struct was generated from the following file: