LLVM: llvm::OptionalValueCast< To, From, Derived (original) (raw)
This cast trait provides std::optional casting. More...
#include "[llvm/Support/Casting.h](Casting%5F8h%5Fsource.html)"
Inheritance diagram for llvm::OptionalValueCast< To, From, Derived >:
| Static Public Member Functions | |
|---|---|
| static std::optional< To > | castFailed () |
| static std::optional< To > | doCast (const From &f) |
| Static Public Member Functions inherited from llvm::CastIsPossible< To, From, Enable > | |
| static bool | isPossible (const From &f) |
| Static Public Member Functions inherited from llvm::DefaultDoCastIfPossible< std::optional< To >, From, detail::SelfType< void, OptionalValueCast< To, From > > > | |
| static To | doCastIfPossible (From f) |
Detailed Description
template<typename To, typename From, typename Derived = void>
struct llvm::OptionalValueCast< To, From, Derived >
This cast trait provides std::optional casting.
This means that if you have a value type, you can cast it to another value type and have dyn_cast return an std::optional.
Definition at line 365 of file Casting.h.
Member Function Documentation
◆ castFailed()
template<typename To, typename From, typename Derived = void>
◆ doCast()
template<typename To, typename From, typename Derived = void>
The documentation for this struct was generated from the following file:
- include/llvm/Support/Casting.h