poly_cast overloads
Declared in <folly/detail/PolyDetail.h>
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */&
poly_cast(/* implementation-defined */&);
» more...
Returns a reference to the object of type T stored in a PolyRoot.
template<
class T,
class I>
/* implementation-defined */&
poly_cast(/* implementation-defined */& that);
» more...
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */ const&
poly_cast(/* implementation-defined */ const&);
» more...
Returns a const reference to the object of type T stored in a PolyRoot.
template<
class T,
class I>
/* implementation-defined */ const&
poly_cast(/* implementation-defined */ const& that);
» more...
template<
class T,
class Poly>
requires detail::IsPoly<Poly>::value
constexpr
decltype(poly_cast<T>(std::declval<Poly>().get()))
poly_cast(Poly&& that);
» more...
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */&&
poly_cast(/* implementation-defined */&&);
» more...
/////////////////////////////////////////////////////////////////////////////
template<
class T,
class I>
/* implementation-defined */&&
poly_cast(/* implementation-defined */&& that);
» more...
T object stored in or referred to by that. Throws BadPolyAccess if that is empty. Throws BadPolyCast if that does not store or refer to an object of type T.| Name | Description |
|---|---|
| T | The (unqualified) type to which to cast the Poly object. |
| Poly | The type of the Poly object. |
| Name | Description |
|---|---|
| that | The PolyRoot holding the object. |