forward overloads

Synopses

Declared in <bsls_util.h>

Return a reference to the specified t of deduced TYPE. If TYPE is an lvalue‐reference type, then the result will be an lvalue‐reference; otherwise an rvalue‐reference.

template<class TYPE>
constexpr
static
TYPE&&
forward(Util_RemoveReference<TYPE>::type& t) noexcept;

Return a reference to the specified t of non‐deduced TYPE. If TYPE is an lvalue‐reference type, then the result will be an lvalue‐reference, and an rvalue‐refernce otherwise. Note that as TYPE is not deduced, it must be explicitly specified by the caller of this function. Also note that while this function may return an rvalue‐reference, it cannot extend the lifetime of temporaries beyond the expression that calls this function; storing an rvalue reference to the result will lead to undefined behavior.

template<class TYPE>
constexpr
static
TYPE&&
forward(Util_RemoveReference<TYPE>::type&& t) noexcept;

Created with MrDocs