WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::ValueIsPresent< T, Enable > Struct Template Reference

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

#include <wpi/util/Casting.hpp>

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::util::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::util::ValueIsPresent< T, Enable >::UnwrappedType = T

Member Function Documentation

◆ isPresent()

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

◆ unwrapValue()

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

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