absl::forward

Forward an lvalue as either an lvalue or an rvalue.

Synopsis

Declared in <absl/utility/utility.h>

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

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.