|
84 | 84 | template<class In>
|
85 | 85 | concept indirectly_readable = @\seebelow@; // freestanding
|
86 | 86 |
|
| 87 | + template<@\libconcept{indirectly_readable}@ T> |
| 88 | + using @\exposidnc{indirect-value-t}@ = @\seebelow@; // \expos |
| 89 | + |
87 | 90 | template<@\libconcept{indirectly_readable}@ T>
|
88 | 91 | using @\libglobal{iter_common_reference_t}@ = // freestanding
|
89 |
| - common_reference_t<iter_reference_t<T>, iter_value_t<T>&>; |
| 92 | + common_reference_t<iter_reference_t<T>, @\exposid{indirect-value-t}@<T>>; |
90 | 93 |
|
91 | 94 | // \ref{iterator.concept.writable}, concept \libconcept{indirectly_writable}
|
92 | 95 | template<class Out, class T>
|
|
2411 | 2414 | There are several concepts that group requirements of algorithms that
|
2412 | 2415 | take callable objects\iref{func.def} as arguments.
|
2413 | 2416 |
|
| 2417 | +\rSec3[indirectcallable.traits]{Indirect callable traits} |
| 2418 | + |
| 2419 | +\pnum |
| 2420 | +To implement algorithms taking projections, |
| 2421 | +it is necessary to determine the projected type of an iterator's value type. |
| 2422 | +For the exposition-only alias template \exposid{indirect-value-t}, |
| 2423 | +\tcode{\exposid{indirect-value-t}<T>} denotes |
| 2424 | +\begin{itemize} |
| 2425 | +\item |
| 2426 | +\tcode{invoke_result_t<Proj\&, \exposid{indirect-value-t}<I>>} |
| 2427 | +if \tcode{T} names \tcode{projected<I, Proj>}, and |
| 2428 | +\item |
| 2429 | +\tcode{iter_value_t<T>\&} otherwise. |
| 2430 | +\end{itemize} |
| 2431 | + |
2414 | 2432 | \rSec3[indirectcallable.indirectinvocable]{Indirect callables}
|
2415 | 2433 |
|
2416 | 2434 | \pnum
|
|
2423 | 2441 | concept @\deflibconcept{indirectly_unary_invocable}@ =
|
2424 | 2442 | @\libconcept{indirectly_readable}@<I> &&
|
2425 | 2443 | @\libconcept{copy_constructible}@<F> &&
|
2426 |
| - @\libconcept{invocable}@<F&, iter_value_t<I>&> && |
| 2444 | + @\libconcept{invocable}@<F&, @\exposid{indirect-value-t}@<I>> && |
2427 | 2445 | @\libconcept{invocable}@<F&, iter_reference_t<I>> &&
|
2428 | 2446 | @\libconcept{invocable}@<F&, iter_common_reference_t<I>> &&
|
2429 | 2447 | @\libconcept{common_reference_with}@<
|
2430 |
| - invoke_result_t<F&, iter_value_t<I>&>, |
| 2448 | + invoke_result_t<F&, @\exposid{indirect-value-t}@<I>>, |
2431 | 2449 | invoke_result_t<F&, iter_reference_t<I>>>;
|
2432 | 2450 |
|
2433 | 2451 | template<class F, class I>
|
2434 | 2452 | concept @\deflibconcept{indirectly_regular_unary_invocable}@ =
|
2435 | 2453 | @\libconcept{indirectly_readable}@<I> &&
|
2436 | 2454 | @\libconcept{copy_constructible}@<F> &&
|
2437 |
| - @\libconcept{regular_invocable}@<F&, iter_value_t<I>&> && |
| 2455 | + @\libconcept{regular_invocable}@<F&, @\exposid{indirect-value-t}@<I>> && |
2438 | 2456 | @\libconcept{regular_invocable}@<F&, iter_reference_t<I>> &&
|
2439 | 2457 | @\libconcept{regular_invocable}@<F&, iter_common_reference_t<I>> &&
|
2440 | 2458 | @\libconcept{common_reference_with}@<
|
2441 |
| - invoke_result_t<F&, iter_value_t<I>&>, |
| 2459 | + invoke_result_t<F&, @\exposid{indirect-value-t}@<I>>, |
2442 | 2460 | invoke_result_t<F&, iter_reference_t<I>>>;
|
2443 | 2461 |
|
2444 | 2462 | template<class F, class I>
|
2445 | 2463 | concept @\deflibconcept{indirect_unary_predicate}@ =
|
2446 | 2464 | @\libconcept{indirectly_readable}@<I> &&
|
2447 | 2465 | @\libconcept{copy_constructible}@<F> &&
|
2448 |
| - @\libconcept{predicate}@<F&, iter_value_t<I>&> && |
| 2466 | + @\libconcept{predicate}@<F&, @\exposid{indirect-value-t}@<I>> && |
2449 | 2467 | @\libconcept{predicate}@<F&, iter_reference_t<I>> &&
|
2450 | 2468 | @\libconcept{predicate}@<F&, iter_common_reference_t<I>>;
|
2451 | 2469 |
|
2452 | 2470 | template<class F, class I1, class I2>
|
2453 | 2471 | concept @\deflibconcept{indirect_binary_predicate}@ =
|
2454 | 2472 | @\libconcept{indirectly_readable}@<I1> && @\libconcept{indirectly_readable}@<I2> &&
|
2455 | 2473 | @\libconcept{copy_constructible}@<F> &&
|
2456 |
| - @\libconcept{predicate}@<F&, iter_value_t<I1>&, iter_value_t<I2>&> && |
2457 |
| - @\libconcept{predicate}@<F&, iter_value_t<I1>&, iter_reference_t<I2>> && |
2458 |
| - @\libconcept{predicate}@<F&, iter_reference_t<I1>, iter_value_t<I2>&> && |
| 2474 | + @\libconcept{predicate}@<F&, @\exposid{indirect-value-t}@<I1>, @\exposid{indirect-value-t}@<I2>> && |
| 2475 | + @\libconcept{predicate}@<F&, @\exposid{indirect-value-t}@<I1>, iter_reference_t<I2>> && |
| 2476 | + @\libconcept{predicate}@<F&, iter_reference_t<I1>, @\exposid{indirect-value-t}@<I2>> && |
2459 | 2477 | @\libconcept{predicate}@<F&, iter_reference_t<I1>, iter_reference_t<I2>> &&
|
2460 | 2478 | @\libconcept{predicate}@<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>;
|
2461 | 2479 |
|
2462 | 2480 | template<class F, class I1, class I2 = I1>
|
2463 | 2481 | concept @\deflibconcept{indirect_equivalence_relation}@ =
|
2464 | 2482 | @\libconcept{indirectly_readable}@<I1> && @\libconcept{indirectly_readable}@<I2> &&
|
2465 | 2483 | @\libconcept{copy_constructible}@<F> &&
|
2466 |
| - @\libconcept{equivalence_relation}@<F&, iter_value_t<I1>&, iter_value_t<I2>&> && |
2467 |
| - @\libconcept{equivalence_relation}@<F&, iter_value_t<I1>&, iter_reference_t<I2>> && |
2468 |
| - @\libconcept{equivalence_relation}@<F&, iter_reference_t<I1>, iter_value_t<I2>&> && |
| 2484 | + @\libconcept{equivalence_relation}@<F&, @\exposid{indirect-value-t}@<I1>, @\exposid{indirect-value-t}@<I2>> && |
| 2485 | + @\libconcept{equivalence_relation}@<F&, @\exposid{indirect-value-t}@<I1>, iter_reference_t<I2>> && |
| 2486 | + @\libconcept{equivalence_relation}@<F&, iter_reference_t<I1>, @\exposid{indirect-value-t}@<I2>&> && |
2469 | 2487 | @\libconcept{equivalence_relation}@<F&, iter_reference_t<I1>, iter_reference_t<I2>> &&
|
2470 | 2488 | @\libconcept{equivalence_relation}@<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>;
|
2471 | 2489 |
|
2472 | 2490 | template<class F, class I1, class I2 = I1>
|
2473 | 2491 | concept @\deflibconcept{indirect_strict_weak_order}@ =
|
2474 | 2492 | @\libconcept{indirectly_readable}@<I1> && @\libconcept{indirectly_readable}@<I2> &&
|
2475 | 2493 | @\libconcept{copy_constructible}@<F> &&
|
2476 |
| - @\libconcept{strict_weak_order}@<F&, iter_value_t<I1>&, iter_value_t<I2>&> && |
2477 |
| - @\libconcept{strict_weak_order}@<F&, iter_value_t<I1>&, iter_reference_t<I2>> && |
2478 |
| - @\libconcept{strict_weak_order}@<F&, iter_reference_t<I1>, iter_value_t<I2>&> && |
| 2494 | + @\libconcept{strict_weak_order}@<F&, @\exposid{indirect-value-t}@<I1>, @\exposid{indirect-value-t}@<I2>> && |
| 2495 | + @\libconcept{strict_weak_order}@<F&, @\exposid{indirect-value-t}@<I1>, iter_reference_t<I2>> && |
| 2496 | + @\libconcept{strict_weak_order}@<F&, iter_reference_t<I1>, @\exposid{indirect-value-t}@<I2>> && |
2479 | 2497 | @\libconcept{strict_weak_order}@<F&, iter_reference_t<I1>, iter_reference_t<I2>> &&
|
2480 | 2498 | @\libconcept{strict_weak_order}@<F&, iter_common_reference_t<I1>, iter_common_reference_t<I2>>;
|
2481 | 2499 | }
|
|
0 commit comments