Skip to content

Commit 0cf7b17

Browse files
authored
Merge 2023-06 LWG Motion 8
P2538R1 ADL-proof std::projected
2 parents 9d040dc + 1a805a7 commit 0cf7b17

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

source/iterators.tex

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,16 +2512,18 @@
25122512
\indexlibraryglobal{projected}%
25132513
\begin{codeblock}
25142514
namespace std {
2515-
template<@\libconcept{indirectly_readable}@ I, @\libconcept{indirectly_regular_unary_invocable}@<I> Proj>
2516-
struct projected {
2517-
using value_type = remove_cvref_t<indirect_result_t<Proj&, I>>;
2518-
indirect_result_t<Proj&, I> operator*() const; // \notdef
2515+
template<class I, class Proj>
2516+
struct @\exposidnc{projected-impl}@ { // \expos
2517+
struct @\exposidnc{type}@ { // \expos
2518+
using value_type = remove_cvref_t<indirect_result_t<Proj&, I>>;
2519+
using difference_type = iter_difference_t<I>; // present only if \tcode{I}
2520+
// models \libconcept{weakly_incrementable}
2521+
indirect_result_t<Proj&, I> operator*() const; // \notdef
2522+
};
25192523
};
25202524

2521-
template<@\libconcept{weakly_incrementable}@ I, class Proj>
2522-
struct incrementable_traits<projected<I, Proj>> {
2523-
using difference_type = iter_difference_t<I>;
2524-
};
2525+
template<@\libconcept{indirectly_readable}@ I, @\libconcept{indirectly_regular_unary_invocable}@<I> Proj>
2526+
using projected = @\exposid{projected-impl}@<I, Proj>::@\exposid{type}@;
25252527
}
25262528
\end{codeblock}
25272529

0 commit comments

Comments
 (0)