Files
2025-10-25 03:02:53 +03:00

27 lines
612 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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);