LLVM 20.0.0git
Static Public Member Functions | List of all members
llvm::CastIsPossible< To, From, Enable > Struct Template Reference

This struct provides a way to check if a given cast is possible. More...

#include "llvm/Support/Casting.h"

Inheritance diagram for llvm::CastIsPossible< To, From, Enable >:
Inheritance graph
[legend]

Static Public Member Functions

static bool isPossible (const From &f)
 

Detailed Description

template<typename To, typename From, typename Enable = void>
struct llvm::CastIsPossible< To, From, Enable >

This struct provides a way to check if a given cast is possible.

It provides a static function called isPossible that is used to check if a cast can be performed. It should be overridden like this:

template<> struct CastIsPossible<foo, bar> { static inline bool isPossible(const bar &b) { return bar.isFoo(); } };

Definition at line 253 of file Casting.h.

Member Function Documentation

◆ isPossible()

template<typename To , typename From , typename Enable = void>
static bool llvm::CastIsPossible< To, From, Enable >::isPossible ( const From f)
inlinestatic

Definition at line 254 of file Casting.h.

References From.

Referenced by llvm::CastInfo< To, From, Enable >::doCastIfPossible(), and llvm::isa().


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