Forwards const cast sources to a non-const CastInfo implementation.
Declared in <llvm/Support/Casting.h>
template<
typename To,
typename From,
typename ForwardTo>
struct ConstStrippingForwardingCast;
Provides a cast trait that strips const from types to make it easier to implement a const-version of a non-const cast. It just removes boilerplate and reduces the amount of code you as the user need to implement. You can use it like this:
template<> struct CastInfo<foo, bar> { ...verbose implementation... };
template<> struct CastInfo<foo, const bar> : public ConstStrippingForwardingCast<foo, const bar, CastInfo<foo, bar>> {};
| Name | Description |
|---|---|
DecayedFrom | From with cv-qualifiers and pointer removed. |
NonConstFrom | Non-const pointer or reference form of From used for forwarding. |
| Name | Description |
|---|---|
castFailed | Forwards the failed-cast sentinel to the non-const ForwardTo trait. |
doCast | Forwards the cast to the non-const ForwardTo trait. |
doCastIfPossible | Forwards a fallible cast to the non-const ForwardTo trait. |
isPossible | Forwards the possibility check to the non-const ForwardTo trait. |
| Name | Description |
|---|---|
CastInfo<To, PointerUnion<PTs...> const> | CastInfo specialization for const PointerUnion sources. |