2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
9 #ifndef _LIBCPP___ITERATOR_PROJECTED_H
10 #define _LIBCPP___ITERATOR_PROJECTED_H
13 #include <__iterator/concepts.h>
14 #include <__iterator/incrementable_traits.h>
15 #include <type_traits>
17 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
18 #pragma GCC system_header
21 _LIBCPP_BEGIN_NAMESPACE_STD
23 #if !defined(_LIBCPP_HAS_NO_RANGES)
25 template<indirectly_readable _It
, indirectly_regular_unary_invocable
<_It
> _Proj
>
27 using value_type
= remove_cvref_t
<indirect_result_t
<_Proj
&, _It
>>;
28 indirect_result_t
<_Proj
&, _It
> operator*() const; // not defined
31 template<weakly_incrementable _It
, class _Proj
>
32 struct incrementable_traits
<projected
<_It
, _Proj
>> {
33 using difference_type
= iter_difference_t
<_It
>;
36 #endif // !defined(_LIBCPP_HAS_NO_RANGES)
38 _LIBCPP_END_NAMESPACE_STD
40 #endif // _LIBCPP___ITERATOR_PROJECTED_H