struct UniquePtrCast
Declaration
template <typename To, typename From, typename Derived = void>
struct UniquePtrCast { /* full declaration omitted */ };
Description
This cast trait provides std::unique_ptr casting. It has the semantics of moving the contents of the input unique_ptr into the output unique_ptr during the cast. It's also a good example of how to implement a move-only cast.
Declared at: llvm/include/llvm/Support/Casting.h:344
Templates
- To
- From
- Derived = void
Method Overview
- public static inline llvm::UniquePtrCast::CastResultType castFailed()
- public static inline llvm::UniquePtrCast::CastResultType doCast(std::unique_ptr<From> && f)
- public static inline llvm::UniquePtrCast::CastResultType doCastIfPossible(std::unique_ptr<From> && f)
Methods
¶static inline llvm::UniquePtrCast::CastResultType
castFailed()
static inline llvm::UniquePtrCast::CastResultType
castFailed()
Declared at: llvm/include/llvm/Support/Casting.h:353
¶static inline llvm::UniquePtrCast::CastResultType
doCast(std::unique_ptr<From>&& f)
static inline llvm::UniquePtrCast::CastResultType
doCast(std::unique_ptr<From>&& f)
Declared at: llvm/include/llvm/Support/Casting.h:349
Parameters
- std::unique_ptr<From>&& f
¶static inline llvm::UniquePtrCast::CastResultType
doCastIfPossible(std::unique_ptr<From>&& f)
static inline llvm::UniquePtrCast::CastResultType
doCastIfPossible(std::unique_ptr<From>&& f)
Declared at: llvm/include/llvm/Support/Casting.h:355
Parameters
- std::unique_ptr<From>&& f