LLVM 20.0.0git
Public Types | Static Public Member Functions | List of all members
llvm::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 "llvm/ADT/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 llvm::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:118
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.

Definition at line 226 of file PointerUnion.h.

Member Typedef Documentation

◆ From

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

Definition at line 227 of file PointerUnion.h.

Member Function Documentation

◆ doCast()

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

Definition at line 233 of file PointerUnion.h.

References assert(), and F.

◆ isPossible()

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

Definition at line 229 of file PointerUnion.h.

References F, and value.


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