poly_cast overloads
Synopses
Declared in <folly/detail/PolyDetail.h>
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */&
poly_cast(/* implementation-defined */&);
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);
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */ const&
poly_cast(/* implementation-defined */ const&);
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);
template<
class T,
class Poly>
requires detail::IsPoly<Poly>::value
constexpr
decltype(poly_cast<T>(std::declval<Poly>().get()))
poly_cast(Poly&& that);
template<
class T,
class I>
[[noreturn]]
/* implementation-defined */&&
poly_cast(/* implementation-defined */&&);
/////////////////////////////////////////////////////////////////////////////
template<
class T,
class I>
/* implementation-defined */&&
poly_cast(/* implementation-defined */&& that);
Return Value
-
A reference to the stored object cast to type T.
-
A const reference to the stored object cast to type T.
-
A reference to the
Tobject stored in or referred to bythat. ThrowsBadPolyAccessifthatis empty. ThrowsBadPolyCastifthatdoes not store or refer to an object of typeT.
Template Parameters
Name |
Description |
T |
The (unqualified) type to which to cast the |
Poly |
The type of the |
Parameters
Name |
Description |
that |
The PolyRoot holding the object. |
Created with MrDocs