struct ConstStrippingForwardingCast
Declaration
template <typename To, typename From, typename ForwardTo>
struct ConstStrippingForwardingCast { /* full declaration omitted */ };
Description
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>> {};
Declared at: llvm/include/llvm/Support/Casting.h:389
Templates
- To
- From
- ForwardTo
Method Overview
- public static inline decltype(auto) castFailed()
- public static inline decltype(auto) doCast(const From & f)
- public static inline decltype(auto) doCastIfPossible(const From & f)
- public static inline bool isPossible(const From & f)
Methods
¶static inline decltype(auto) castFailed()
static inline decltype(auto) castFailed()
Declared at: llvm/include/llvm/Support/Casting.h:400
¶static inline decltype(auto) doCast(const From& f)
static inline decltype(auto) doCast(const From& f)
Declared at: llvm/include/llvm/Support/Casting.h:402
Parameters
- const From& f
¶static inline decltype(auto) doCastIfPossible(
const From& f)
static inline decltype(auto) doCastIfPossible(
const From& f)
Declared at: llvm/include/llvm/Support/Casting.h:406
Parameters
- const From& f
¶static inline bool isPossible(const From& f)
static inline bool isPossible(const From& f)
Declared at: llvm/include/llvm/Support/Casting.h:396
Parameters
- const From& f