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