|
258 | 258 | features. These concepts express relationships between types, type
|
259 | 259 | classifications, and fundamental type properties.
|
260 | 260 |
|
261 |
| -\pnum |
262 |
| -\begin{example} |
263 |
| -Several concept specifications in this subclause are specified in terms of a |
264 |
| -type trait, and include an annotation that there need be no subsumption |
265 |
| -relationship between the concept and the type trait. Given the following set of |
266 |
| -declarations: |
267 |
| -\begin{codeblock} |
268 |
| -template<class T> concept C1 = is_c1_v<T>; |
269 |
| -template<class U> concept C2 = C1<U> && true; |
270 |
| - |
271 |
| -template<C1 T> void f(T); // \#1 |
272 |
| -template<C2 T> void f(T); // \#2 |
273 |
| - |
274 |
| -template<class T> |
275 |
| -void g(T) requires is_c1_v<T>; // \#3 |
276 |
| -template<C2 T> void g(T); // \#4 |
277 |
| -\end{codeblock} |
278 |
| -Since \tcode{C2} subsumes \tcode{C1}, the expression \tcode{f(42)} unambiguously |
279 |
| -calls \#2. \tcode{g(42)}, however, is potentially ambiguous if there need be no |
280 |
| -subsumption relationship between \tcode{C1} and \tcode{is_c1_v}. |
281 |
| -\end{example} |
282 |
| - |
283 | 261 | \rSec2[concept.same]{Concept \libconcept{Same}}
|
284 | 262 |
|
285 | 263 | \indexlibrary{\idxcode{Same}}%
|
|
289 | 267 | \end{itemdecl}
|
290 | 268 |
|
291 | 269 | \begin{itemdescr}
|
292 |
| -\pnum |
293 |
| -There need be no subsumption relationship between |
294 |
| -\tcode{\libconcept{Same}<T, U>} |
295 |
| -and |
296 |
| -\tcode{is_same_v<T, U>}. |
297 |
| - |
298 | 270 | \pnum
|
299 | 271 | \tcode{\libconcept{Same}<T, U>} subsumes \tcode{\libconcept{Same}<U, T>} and
|
300 | 272 | vice versa.
|
|
311 | 283 | \end{itemdecl}
|
312 | 284 |
|
313 | 285 | \begin{itemdescr}
|
314 |
| -\pnum |
315 |
| -There need be no subsumption relationship between |
316 |
| -\tcode{\libconcept{DerivedFrom}<Derived, Base>} |
317 |
| -and either |
318 |
| -\tcode{is_base_of_v<Base, Derived>} |
319 |
| -or |
320 |
| -\tcode{is_convertible_v<const volatile Derived*, |
321 |
| - const \brk{}volatile \brk{}Base*>}. |
322 |
| - |
323 | 286 | \pnum
|
324 | 287 | \begin{note}
|
325 | 288 | \tcode{\libconcept{DerivedFrom}<Derived, Base>} is satisfied if and only if
|
|
376 | 339 | Otherwise, the object referred to by \tcode{f()} is not modified by either above
|
377 | 340 | expression.
|
378 | 341 | \end{itemize}
|
379 |
| - |
380 | 342 | \end{itemize}
|
381 |
| - |
382 |
| -\pnum |
383 |
| -There need be no subsumption relationship between |
384 |
| -\tcode{\libconcept{ConvertibleTo}<From, To>} |
385 |
| -and |
386 |
| -\tcode{is_\-convert\-ible_v\brk{}<From,\brk{} To>}. |
387 | 343 | \end{itemdescr}
|
388 | 344 |
|
389 | 345 |
|
|
497 | 453 | \end{itemdecl}
|
498 | 454 |
|
499 | 455 | \begin{itemdescr}
|
500 |
| -\pnum |
501 |
| -There need be no subsumption relationship between |
502 |
| -\tcode{\libconcept{Integral}<T>} |
503 |
| -and |
504 |
| -\tcode{is_integral_v<T>}. |
505 |
| - |
506 |
| -\pnum |
507 |
| -There need be no subsumption relationship between |
508 |
| -\tcode{\libconcept{SignedIntegral}<T>} |
509 |
| -and |
510 |
| -\tcode{is_signed_v<T>}. |
511 |
| - |
512 | 456 | \pnum
|
513 | 457 | \begin{note}
|
514 | 458 | \tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are
|
|
565 | 509 | \end{itemize}
|
566 | 510 | \end{itemize}
|
567 | 511 |
|
568 |
| -\pnum |
569 |
| -There need be no subsumption relationship between |
570 |
| -\tcode{\libconcept{Assignable}<LHS, RHS>} |
571 |
| -and |
572 |
| -\tcode{is_lvalue_refer\-ence_v<LHS>}. |
573 |
| - |
574 | 512 | \pnum
|
575 | 513 | \begin{note}
|
576 | 514 | Assignment need not be a total function\iref{structure.requirements};
|
|
607 | 545 | \item the lookup set produced by argument-dependent
|
608 | 546 | lookup\iref{basic.lookup.argdep}.
|
609 | 547 | \end{itemize}
|
610 |
| - |
611 |
| -\pnum |
612 |
| -There need be no subsumption relationship between |
613 |
| -\tcode{\libconcept{Swappable}<T>} |
614 |
| -and |
615 |
| -\tcode{is_swappable_v<T>}. |
616 | 548 | \end{itemdescr}
|
617 | 549 |
|
618 | 550 | \indexlibrary{\idxcode{SwappableWith}}%
|
|
659 | 591 | \item the lookup set produced by argument-dependent
|
660 | 592 | lookup\iref{basic.lookup.argdep}.
|
661 | 593 | \end{itemize}
|
662 |
| - |
663 |
| -\pnum |
664 |
| -There need be no subsumption relationship between |
665 |
| -\tcode{\libconcept{SwappableWith}<T, U>} |
666 |
| -and any specialization of |
667 |
| -\tcode{is_swappable_with_v}. |
668 | 594 | \end{itemdescr}
|
669 | 595 |
|
670 | 596 | \begin{itemdescr}
|
|
746 | 672 | \end{itemdecl}
|
747 | 673 |
|
748 | 674 | \begin{itemdescr}
|
749 |
| -\pnum |
750 |
| -There need be no subsumption relationship between |
751 |
| -\tcode{\libconcept{Destructible}<T>} |
752 |
| -and |
753 |
| -\tcode{is_\-no\-throw_\-destruct\-ible_v<T>}. |
754 |
| - |
755 | 675 | \pnum
|
756 | 676 | \begin{note}
|
757 | 677 | Unlike the \oldconcept{Destructible} requirements~(\tref{destructible}), this
|
|
771 | 691 | concept Constructible = Destructible<T> && is_constructible_v<T, Args...>;
|
772 | 692 | \end{itemdecl}
|
773 | 693 |
|
774 |
| -\begin{itemdescr} |
775 |
| -\pnum |
776 |
| -There need be no subsumption relationship between |
777 |
| -\tcode{\libconcept{Constructible}<T, Args...>} |
778 |
| -and |
779 |
| -\tcode{is_const\-ruct\-ible_v<T, Args...>}. |
780 |
| -\end{itemdescr} |
781 |
| - |
782 | 694 | \rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}}
|
783 | 695 |
|
784 | 696 | \indexlibrary{\idxcode{DefaultConstructible}}%
|
|
1075 | 987 | concept Movable = is_object_v<T> && MoveConstructible<T> && Assignable<T&, T> && Swappable<T>;
|
1076 | 988 | \end{itemdecl}
|
1077 | 989 |
|
1078 |
| -\begin{itemdescr} |
1079 |
| -\pnum |
1080 |
| -There need be no subsumption relationship between |
1081 |
| -\tcode{\libconcept{Movable}<T>} |
1082 |
| -and |
1083 |
| -\tcode{is_object_v<T>}. |
1084 |
| -\end{itemdescr} |
1085 |
| - |
1086 | 990 | \rSec2[concept.copyable]{Concept \libconcept{Copyable}}
|
1087 | 991 |
|
1088 | 992 | \indexlibrary{\idxcode{Copyable}}%
|
|
0 commit comments