folly::poly_cast

Returns a const reference to the object of type T stored in a PolyRoot.

Synopsis

Declared in <folly/detail/PolyDetail.h>

template<
    class T,
    class I>
/* implementation-defined */ const&
poly_cast(/* implementation-defined */ const& that);

Return Value

A const reference to the stored object cast to type T.

Parameters

NameDescription
thatThe PolyRoot holding the object.