Cast trait that moves a unique_ptr during a successful cast.
Synopsis
Declared in <llvm/Support/Casting.h>
template<
typename To,
typename From,
typename Derived = void>
struct UniquePtrCast
: CastIsPossible<To, From*>
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.
Base Classes
Name |
Description |
Trait that reports whether a cast from |
Type Aliases
Name |
Description |
unique_ptr result type produced by this unique_ptr cast. |
|
Derived cast type used to call static helpers through CRTP. |
Static Member Functions
Name |
Description |
Returns a null unique_ptr when the cast fails. |
|
Moves |
|
Moves and casts |
|
Returns true if a cast from |
Derived Classes
Name |
Description |
Provide a CastInfo specialized for std::unique_ptr. |
Created with MrDocs