File indexing completed on 2026-05-03 08:13:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LIBCPP___CXX03___ITERATOR_PROJECTED_H
0011 #define _LIBCPP___CXX03___ITERATOR_PROJECTED_H
0012
0013 #include <__cxx03/__config>
0014 #include <__cxx03/__iterator/concepts.h>
0015 #include <__cxx03/__iterator/incrementable_traits.h> // iter_difference_t
0016 #include <__cxx03/__type_traits/remove_cvref.h>
0017
0018 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0019 # pragma GCC system_header
0020 #endif
0021
0022 _LIBCPP_BEGIN_NAMESPACE_STD
0023
0024 #if _LIBCPP_STD_VER >= 20
0025
0026 template <class _It, class _Proj>
0027 struct __projected_impl {
0028 struct __type {
0029 using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
0030 indirect_result_t<_Proj&, _It> operator*() const;
0031 };
0032 };
0033
0034 template <weakly_incrementable _It, class _Proj>
0035 struct __projected_impl<_It, _Proj> {
0036 struct __type {
0037 using value_type = remove_cvref_t<indirect_result_t<_Proj&, _It>>;
0038 using difference_type = iter_difference_t<_It>;
0039 indirect_result_t<_Proj&, _It> operator*() const;
0040 };
0041 };
0042
0043
0044
0045
0046 template <indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
0047 using projected = typename __projected_impl<_It, _Proj>::__type;
0048
0049 #endif
0050
0051 _LIBCPP_END_NAMESPACE_STD
0052
0053 #endif