Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::identity Class Reference

A backport of the C++20 std::identity function object. It returns its input unchanged. More...

Inheritance diagram for arene::base::identity:
Inheritance graph

Public Types

using is_transparent = void
 Indicates that this function object can be used with transparent comparisons.
 

Public Member Functions

template<typename T>
constexpr auto operator() (T &&value) const noexcept -> T &&
 Returns the input value unchanged as if forwarded via std::forward.
 

Detailed Description

A backport of the C++20 std::identity function object. It returns its input unchanged.

Member Typedef Documentation

◆ is_transparent

Indicates that this function object can be used with transparent comparisons.

Member Function Documentation

◆ operator()()

template<typename T>
auto arene::base::identity::operator() ( T && value) const -> T&&
inlineconstexprnoexcept

Returns the input value unchanged as if forwarded via std::forward.

Template Parameters
TThe input type.
Parameters
valueThe input value.
Returns
T&& The forwarded input value, unchanged.

The documentation for this class was generated from the following file: