LLVM 19.0.0git
Static Public Member Functions | List of all members
llvm::OptionalValueCast< To, From, Derived > Struct Template Reference

This cast trait provides std::optional<T> casting. More...

#include "llvm/Support/Casting.h"

Inheritance diagram for llvm::OptionalValueCast< To, From, Derived >:
Inheritance graph
[legend]

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< To, From, Derived >
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<T> 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<T>.

Definition at line 365 of file Casting.h.

Member Function Documentation

◆ castFailed()

template<typename To , typename From , typename Derived = void>
static std::optional< To > llvm::OptionalValueCast< To, From, Derived >::castFailed ( )
inlinestatic

Definition at line 370 of file Casting.h.

◆ doCast()

template<typename To , typename From , typename Derived = void>
static std::optional< To > llvm::OptionalValueCast< To, From, Derived >::doCast ( const From f)
inlinestatic

Definition at line 372 of file Casting.h.


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