isa<X> ‐ Return true if the parameter to the template is an instance of one of the template type arguments. Used like this:

Synopsis

Declared in <llvm/Support/Casting.h>

template<
    typename... To,
    typename From>
[[nodiscard]]
bool
isa(From const& Val);

Description

if (isa<Type>(myVal)) { ... } if (isa<Type0, Type1, Type2>(myVal)) { ... }

Return Value

True if Val is an instance of any of the To types.

Note

The return value should not be discarded.

Parameters

Name

Description

Val

Value to test against the To types.

Created with MrDocs