absl::forward

forward overloads

Synopses

Declared in <absl/utility/utility.h>

Forward an lvalue as either an lvalue or an rvalue.

template<class T>
[[deprecated("Use std::forward instead."), nodiscard]]
constexpr
T&&
forward(std::remove_reference_t<T>& arg) noexcept;
» more...

Forward an rvalue as an rvalue.

template<class T>
[[deprecated("Use std::forward instead."), nodiscard]]
constexpr
T&&
forward(std::remove_reference_t<T>&& arg) noexcept;
» more...

WARNING

Deprecated: Use std::forward instead.. Use of this entity is allowed but discouraged.

Return Value

arg cast to the deduced reference type.

NOTE

The return value should not be discarded.

Parameters

NameDescription
argThe value to forward.