WPILibC++ 2024.3.2
wpi::CastInfoPointerUnionImpl< PTs > Struct Template Reference

We can't (at least, at this moment with C++14) declare CastInfo as a friend of PointerUnion like this: More...

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

Public Types

using From = PointerUnion< PTs... >
 

Static Public Member Functions

template<typename To >
static bool isPossible (From &F)
 
template<typename To >
static To doCast (From &F)
 

Detailed Description

template<typename... PTs>
struct wpi::CastInfoPointerUnionImpl< PTs >

We can't (at least, at this moment with C++14) declare CastInfo as a friend of PointerUnion like this:

template<typename To>
friend struct CastInfo<To, PointerUnion<PTs...>>;
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
Definition: PointerUnion.h:163
This struct provides a method for customizing the way a cast is performed.
Definition: Casting.h:476

The compiler complains 'Partial specialization cannot be declared as a friend'. So we define this struct to be a bridge between CastInfo and PointerUnion.

Member Typedef Documentation

◆ From

template<typename... PTs>
using wpi::CastInfoPointerUnionImpl< PTs >::From = PointerUnion<PTs...>

Member Function Documentation

◆ doCast()

template<typename... PTs>
template<typename To >
static To wpi::CastInfoPointerUnionImpl< PTs >::doCast ( From F)
inlinestatic

◆ isPossible()

template<typename... PTs>
template<typename To >
static bool wpi::CastInfoPointerUnionImpl< PTs >::isPossible ( From F)
inlinestatic

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