struct OptionalValueCast

Declaration

template <typename To, typename From, typename Derived = void>
struct OptionalValueCast { /* full declaration omitted */ };

Description

This cast trait provides 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 Optional <T >.

Declared at: llvm/include/llvm/Support/Casting.h:366

Templates

To
From
Derived = void

Method Overview

  • public static inline Optional<To> castFailed()
  • public static inline Optional<To> doCast(const From & f)

Methods

static inline Optional<To> castFailed()

Declared at: llvm/include/llvm/Support/Casting.h:371

static inline Optional<To> doCast(const From& f)

Declared at: llvm/include/llvm/Support/Casting.h:373

Parameters

const From& f