WPILibC++ 2024.3.2
wpi::NullableValueCastFailed< To > Struct Template Reference

All of these cast traits are meant to be implementations for useful casts that users may want to use that are outside the standard behavior. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/Casting.h>

Inheritance diagram for wpi::NullableValueCastFailed< To >:
wpi::ValueFromPointerCast< To, From, Derived >

Static Public Member Functions

static To castFailed ()
 

Detailed Description

template<typename To>
struct wpi::NullableValueCastFailed< To >

All of these cast traits are meant to be implementations for useful casts that users may want to use that are outside the standard behavior.

An example of how to use a special cast called CastTrait is:

template<> struct CastInfo<foo, bar> : public CastTrait<foo, bar> {};

Essentially, if your use case falls directly into one of the use cases supported by a given cast trait, simply inherit your special CastInfo directly from one of these to avoid having to reimplement the boilerplate isPossible/castFailed/doCast/doCastIfPossible. A cast trait can also provide a subset of those functions. This cast trait just provides castFailed for the specified To type to make CastInfo specializations more declarative. In order to use this, the target result type must be To and To must be constructible from nullptr.

Member Function Documentation

◆ castFailed()

template<typename To >
static To wpi::NullableValueCastFailed< To >::castFailed ( )
inlinestatic

The documentation for this struct was generated from the following file: