27 lines
612 B
Markdown
27 lines
612 B
Markdown
[func.identity]
|
||
|
||
# 22 General utilities library [[utilities]](./#utilities)
|
||
|
||
## 22.10 Function objects [[function.objects]](function.objects#func.identity)
|
||
|
||
### 22.10.12 Class identity [func.identity]
|
||
|
||
[ð](#lib:identity)
|
||
|
||
`struct identity {
|
||
template<class T>
|
||
constexpr T&& operator()(T&& t) const noexcept;
|
||
|
||
using is_transparent = unspecified;
|
||
};
|
||
|
||
template<class T>
|
||
constexpr T&& operator()(T&& t) const noexcept;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L13119)
|
||
|
||
*Effects*: Equivalent to: return std::forward<T>(t);
|