File indexing completed on 2025-12-15 10:26:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef RANGES_V3_FUNCTIONAL_IDENTITY_HPP
0014 #define RANGES_V3_FUNCTIONAL_IDENTITY_HPP
0015
0016 #include <range/v3/detail/config.hpp>
0017
0018 #include <range/v3/detail/prologue.hpp>
0019
0020 namespace ranges
0021 {
0022
0023
0024 struct identity
0025 {
0026 template<typename T>
0027 constexpr T && operator()(T && t) const noexcept
0028 {
0029 return (T &&) t;
0030 }
0031 using is_transparent = void;
0032 };
0033
0034
0035 using ident RANGES_DEPRECATED("Replace uses of ranges::ident with ranges::identity") =
0036 identity;
0037
0038
0039 namespace cpp20
0040 {
0041 using ranges::identity;
0042 }
0043
0044 }
0045
0046 #include <range/v3/detail/epilogue.hpp>
0047
0048 #endif