WPILibC++ 2024.1.1-beta-4
wpi::CastInfo< To, std::optional< From > > Struct Template Reference

Provide a CastInfo specialized for std::optional<From>. More...

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

Inheritance diagram for wpi::CastInfo< To, std::optional< From > >:
wpi::OptionalValueCast< To, From, Derived > wpi::CastIsPossible< To, From, Enable > wpi::DefaultDoCastIfPossible< std::optional< To >, From, detail::SelfType< void, OptionalValueCast< To, From > > >

Additional Inherited Members

- Static Public Member Functions inherited from wpi::OptionalValueCast< To, From, Derived >
static std::optional< To > castFailed ()
 
static std::optional< To > doCast (const From &f)
 
- Static Public Member Functions inherited from wpi::CastIsPossible< To, From, Enable >
static bool isPossible (const From &f)
 
- Static Public Member Functions inherited from wpi::DefaultDoCastIfPossible< std::optional< To >, From, detail::SelfType< void, OptionalValueCast< To, From > > >
static std::optional< To > doCastIfPossible (From f)
 

Detailed Description

template<typename To, typename From>
struct wpi::CastInfo< To, std::optional< From > >

Provide a CastInfo specialized for std::optional<From>.

It's assumed that if the input is std::optional<From> that the output can be std::optional<To>. If that's not the case, specialize CastInfo for your use case.


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