TermOx
include
termox
common
identity.hpp
1
#ifndef TERMOX_COMMON_IDENTITY_HPP
2
#define TERMOX_COMMON_IDENTITY_HPP
3
#include <utility>
4
5
namespace
ox {
6
8
struct
Identity
{
9
template
<
typename
T>
10
[[nodiscard]] constexpr
auto
operator()(T&& x)
const
-> T&&
11
{
12
return
std::forward<T>(x);
13
}
14
};
15
16
}
// namespace ox
17
#endif
// TERMOX_COMMON_IDENTITY_HPP
ox::Identity
Provides an Identity projection operator(), overloaded for any type.
Definition:
identity.hpp:8
Generated by
1.9.1