llvm::any_cast

any_cast overloads

Synopses

Declared in <llvm/ADT/Any.h>

Extract a copy of the held value as type T.

template<class T>
T
any_cast(Any& Value);
» more...

Extract a copy of the held value as type T.

template<class T>
T
any_cast(Any const& Value);
» more...

Move the value held in Value out as type T.

template<class T>
T
any_cast(Any&& Value);
» more...

Return a pointer to the held value, or nullptr if the type does not match.

template<class T>
T*
any_cast(Any* Value);
» more...

Return a pointer to the held value, or nullptr if the type does not match.

template<class T>
T const*
any_cast(Any const* Value);
» more...

Return Value

  • A copy of the held value converted to T.
  • The held value moved and converted to T.
  • Pointer to the held value as T, or nullptr.
  • Const pointer to the held value as T, or nullptr.

Parameters

NameDescription
ValueAny whose held value is copied.