|
267 | 267 | features. These concepts express relationships between types, type
|
268 | 268 | classifications, and fundamental type properties.
|
269 | 269 |
|
270 |
| -\pnum |
271 |
| -\begin{example} |
272 |
| -Several concept specifications in this subclause are specified in terms of a |
273 |
| -type trait, and include an annotation that there need be no subsumption |
274 |
| -relationship between the concept and the type trait. Given the following set of |
275 |
| -declarations: |
276 |
| -\begin{codeblock} |
277 |
| -template<class T> concept C1 = is_c1_v<T>; |
278 |
| -template<class U> concept C2 = C1<U> && true; |
279 |
| - |
280 |
| -template<C1 T> void f(T); // \#1 |
281 |
| -template<C2 T> void f(T); // \#2 |
282 |
| - |
283 |
| -template<class T> |
284 |
| -void g(T) requires is_c1_v<T>; // \#3 |
285 |
| -template<C2 T> void g(T); // \#4 |
286 |
| -\end{codeblock} |
287 |
| -Since \tcode{C2} subsumes \tcode{C1}, the expression \tcode{f(42)} unambiguously |
288 |
| -calls \#2. \tcode{g(42)}, however, is potentially ambiguous if there need be no |
289 |
| -subsumption relationship between \tcode{C1} and \tcode{is_c1_v}. |
290 |
| -\end{example} |
291 |
| - |
292 | 270 | \rSec2[concept.same]{Concept \libconcept{Same}}
|
293 | 271 |
|
294 | 272 | \indexlibrary{\idxcode{Same}}%
|
|
298 | 276 | \end{itemdecl}
|
299 | 277 |
|
300 | 278 | \begin{itemdescr}
|
301 |
| -\pnum |
302 |
| -There need be no subsumption relationship between |
303 |
| -\tcode{\libconcept{Same}<T, U>} |
304 |
| -and |
305 |
| -\tcode{is_same_v<T, U>}. |
306 |
| - |
307 | 279 | \pnum
|
308 | 280 | \tcode{\libconcept{Same}<T, U>} subsumes \tcode{\libconcept{Same}<U, T>} and
|
309 | 281 | vice versa.
|
|
319 | 291 | \end{itemdecl}
|
320 | 292 |
|
321 | 293 | \begin{itemdescr}
|
322 |
| -\pnum |
323 |
| -There need be no subsumption relationship between |
324 |
| -\tcode{\libconcept{DerivedFrom}<Derived, Base>} |
325 |
| -and either |
326 |
| -\tcode{is_base_of_v<Base, Derived>} |
327 |
| -or |
328 |
| -\tcode{is_convertible_v<const volatile Derived*, |
329 |
| - const \brk{}volatile \brk{}Base*>}. |
330 |
| - |
331 | 294 | \pnum
|
332 | 295 | \begin{note}
|
333 | 296 | \tcode{\libconcept{DerivedFrom}<Derived, Base>} is satisfied if and only if
|
|
383 | 346 | Otherwise, the object referred to by \tcode{f()} is not modified by either above
|
384 | 347 | expression.
|
385 | 348 | \end{itemize}
|
386 |
| - |
387 | 349 | \end{itemize}
|
388 |
| - |
389 |
| -\pnum |
390 |
| -There need be no subsumption relationship between |
391 |
| -\tcode{\libconcept{ConvertibleTo}<From, To>} |
392 |
| -and |
393 |
| -\tcode{is_\-convert\-ible_v\brk{}<From,\brk{} To>}. |
394 | 350 | \end{itemdescr}
|
395 | 351 |
|
396 | 352 |
|
|
497 | 453 | concept Integral = is_integral_v<T>;
|
498 | 454 | \end{itemdecl}
|
499 | 455 |
|
500 |
| -\begin{itemdescr} |
501 |
| -\pnum |
502 |
| -There need be no subsumption relationship between |
503 |
| -\tcode{\libconcept{Integral}<T>} |
504 |
| -and |
505 |
| -\tcode{is_integral_v<T>}. |
506 |
| -\end{itemdescr} |
507 |
| - |
508 | 456 | \rSec2[concept.signed.int]{Concept \libconcept{SignedIntegral}}
|
509 | 457 |
|
510 | 458 | \indexlibrary{\idxcode{SignedIntegral}}%
|
|
514 | 462 | \end{itemdecl}
|
515 | 463 |
|
516 | 464 | \begin{itemdescr}
|
517 |
| -\pnum |
518 |
| -There need be no subsumption relationship between |
519 |
| -\tcode{\libconcept{SignedIntegral}<T>} |
520 |
| -and |
521 |
| -\tcode{is_signed_v<T>}. |
522 |
| - |
523 | 465 | \pnum
|
524 | 466 | \begin{note}
|
525 | 467 | \tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are
|
|
586 | 528 | \end{itemize}
|
587 | 529 | \end{itemize}
|
588 | 530 |
|
589 |
| -\pnum |
590 |
| -There need be no subsumption relationship between |
591 |
| -\tcode{\libconcept{Assignable}<LHS, RHS>} |
592 |
| -and |
593 |
| -\tcode{is_lvalue_refer\-ence_v<LHS>}. |
594 |
| - |
595 | 531 | \pnum
|
596 | 532 | \begin{note}
|
597 | 533 | Assignment need not be a total function\iref{structure.requirements};
|
|
628 | 564 | \item the lookup set produced by argument-dependent
|
629 | 565 | lookup\iref{basic.lookup.argdep}.
|
630 | 566 | \end{itemize}
|
631 |
| - |
632 |
| -\pnum |
633 |
| -There need be no subsumption relationship between |
634 |
| -\tcode{\libconcept{Swappable}<T>} |
635 |
| -and |
636 |
| -\tcode{is_swappable_v<T>}. |
637 | 567 | \end{itemdescr}
|
638 | 568 |
|
639 | 569 | \indexlibrary{\idxcode{SwappableWith}}%
|
|
678 | 608 | \item the lookup set produced by argument-dependent
|
679 | 609 | lookup\iref{basic.lookup.argdep}.
|
680 | 610 | \end{itemize}
|
681 |
| - |
682 |
| -\pnum |
683 |
| -There need be no subsumption relationship between |
684 |
| -\tcode{\libconcept{SwappableWith}<T, U>} |
685 |
| -and any specialization of |
686 |
| -\tcode{is_swappable_with_v}. |
687 | 611 | \end{itemdescr}
|
688 | 612 |
|
689 | 613 | \begin{itemdescr}
|
|
764 | 688 | \end{itemdecl}
|
765 | 689 |
|
766 | 690 | \begin{itemdescr}
|
767 |
| -\pnum |
768 |
| -There need be no subsumption relationship between |
769 |
| -\tcode{\libconcept{Destructible}<T>} |
770 |
| -and |
771 |
| -\tcode{is_\-no\-throw_\-destruct\-ible_v<T>}. |
772 |
| - |
773 | 691 | \pnum
|
774 | 692 | \begin{note}
|
775 | 693 | Unlike the \oldconcept{Destructible} requirements~(\tref{destructible}), this
|
|
789 | 707 | concept Constructible = Destructible<T> && is_constructible_v<T, Args...>;
|
790 | 708 | \end{itemdecl}
|
791 | 709 |
|
792 |
| -\begin{itemdescr} |
793 |
| -\pnum |
794 |
| -There need be no subsumption relationship between |
795 |
| -\tcode{\libconcept{Constructible}<T, Args...>} |
796 |
| -and |
797 |
| -\tcode{is_const\-ruct\-ible_v<T, Args...>}. |
798 |
| -\end{itemdescr} |
799 |
| - |
800 | 710 | \rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}}
|
801 | 711 |
|
802 | 712 | \indexlibrary{\idxcode{DefaultConstructible}}%
|
|
1089 | 999 | concept Movable = is_object_v<T> && MoveConstructible<T> && Assignable<T&, T> && Swappable<T>;
|
1090 | 1000 | \end{itemdecl}
|
1091 | 1001 |
|
1092 |
| -\begin{itemdescr} |
1093 |
| -\pnum |
1094 |
| -There need be no subsumption relationship between |
1095 |
| -\tcode{\libconcept{Movable}<T>} |
1096 |
| -and |
1097 |
| -\tcode{is_object_v<T>}. |
1098 |
| -\end{itemdescr} |
1099 |
| - |
1100 | 1002 | \rSec2[concept.copyable]{Concept \libconcept{Copyable}}
|
1101 | 1003 |
|
1102 | 1004 | \indexlibrary{\idxcode{Copyable}}%
|
|
0 commit comments