diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2024-02-21 23:16:42 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2024-02-21 23:33:25 +0300 |
commit | 9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch) | |
tree | 3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/__functional/identity.h | |
parent | f5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff) | |
download | ydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz |
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6
c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__functional/identity.h')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__functional/identity.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__functional/identity.h b/contrib/libs/cxxsupp/libcxx/include/__functional/identity.h index 2fe3acca08..5dffedf677 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__functional/identity.h +++ b/contrib/libs/cxxsupp/libcxx/include/__functional/identity.h @@ -11,6 +11,7 @@ #define _LIBCPP___FUNCTIONAL_IDENTITY_H #include <__config> +#include <__type_traits/integral_constant.h> #include <__utility/forward.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -19,27 +20,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD +template <class _Tp> +struct __is_identity : false_type {}; + struct __identity { template <class _Tp> - _LIBCPP_NODISCARD _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT { + _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT { return std::forward<_Tp>(__t); } using is_transparent = void; }; -#if _LIBCPP_STD_VER > 17 +template <> +struct __is_identity<__identity> : true_type {}; + +#if _LIBCPP_STD_VER >= 20 struct identity { template<class _Tp> - _LIBCPP_NODISCARD_EXT constexpr _Tp&& operator()(_Tp&& __t) const noexcept + _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _Tp&& operator()(_Tp&& __t) const noexcept { return _VSTD::forward<_Tp>(__t); } using is_transparent = void; }; -#endif // _LIBCPP_STD_VER > 17 + +template <> +struct __is_identity<identity> : true_type {}; + +#endif // _LIBCPP_STD_VER >= 20 _LIBCPP_END_NAMESPACE_STD |