WPILibC++ 2024.3.2
|
Provides a cast trait that uses a defined pointer to pointer cast as a base for reference-to-reference casts. More...
#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/Casting.h>
Static Public Member Functions | |
static bool | isPossible (const From &f) |
static decltype(auto) | doCast (const From &f) |
Provides a cast trait that uses a defined pointer to pointer cast as a base for reference-to-reference casts.
Note that it does not provide castFailed and doCastIfPossible because a pointer-to-pointer cast would likely just return nullptr
which could cause nullptr dereference. You can use it like this:
template <> struct CastInfo<foo, bar *> { ... verbose implementation... };
template <> struct CastInfo<foo, bar> : public ForwardToPointerCast<foo, bar, CastInfo<foo, bar *>> {};
|
inlinestatic |
|
inlinestatic |