struct ValueIsPresent
Declaration
template <typename T, typename Enable = void>
struct ValueIsPresent { /* full declaration omitted */ };
Description
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 dereferencing a pointer).
Declared at: llvm/include/llvm/Support/Casting.h:631
Templates
- T
- Enable = void
Method Overview
- public static inline bool isPresent(const T & t)
- public static inline decltype(auto) unwrapValue(T & t)
Methods
¶static inline bool isPresent(const T& t)
static inline bool isPresent(const T& t)
Declared at: llvm/include/llvm/Support/Casting.h:633
Parameters
- const T& t
¶static inline decltype(auto) unwrapValue(T& t)
static inline decltype(auto) unwrapValue(T& t)
Declared at: llvm/include/llvm/Support/Casting.h:634
Parameters
- T& t