|
134 | 134 | };
|
135 | 135 | \end{codeblock}
|
136 | 136 |
|
137 |
| -\tcode{T} fails to meet the implicit requirements of \tcode{C}, so \tcode{C<T>} |
138 |
| -is not satisfied. Since implementations are not required to validate the syntax |
| 137 | +\tcode{T} fails to meet the implicit requirements of \tcode{C}, |
| 138 | +so \tcode{T} satisfies but does not model \tcode{C}. |
| 139 | +Since implementations are not required to validate the syntax |
139 | 140 | of implicit requirements, it is unspecified whether an implementation diagnoses
|
140 | 141 | as ill-formed a program that requires \tcode{C<T>}.
|
141 | 142 | \end{example}
|
|
332 | 333 | return f();
|
333 | 334 | }
|
334 | 335 | \end{codeblock}
|
| 336 | +for some types \tcode{From} and \tcode{To}, |
335 | 337 | and let \tcode{f} be a function with no arguments and return type \tcode{From}
|
336 | 338 | such that \tcode{f()} is equality-preserving.
|
337 |
| -\tcode{\libconcept{ConvertibleTo}<From, To>} is satisfied only if: |
| 339 | +\tcode{From} and \tcode{To} model \tcode{\libconcept{ConvertibleTo}<From, To>} |
| 340 | +only if: |
338 | 341 |
|
339 | 342 | \begin{itemize}
|
340 | 343 | \item
|
|
366 | 369 | \tcode{\libconcept{ConvertibleTo}<T, C>}
|
367 | 370 | and
|
368 | 371 | \tcode{\libconcept{ConvertibleTo}<U, C>}
|
369 |
| -are satisfied, then \tcode{T} and \tcode{U} share a |
| 372 | +are modeled, then \tcode{T} and \tcode{U} share a |
370 | 373 | \term{common reference type}, \tcode{C}.
|
371 | 374 | \begin{note}
|
372 | 375 | \tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
|
|
478 | 481 | \begin{itemdescr}
|
479 | 482 | \pnum
|
480 | 483 | \begin{note}
|
481 |
| -\tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are |
| 484 | +\libconcept{SignedIntegral} can be modeled even by types that are |
482 | 485 | not signed integral types\iref{basic.fundamental}; for example, \tcode{char}.
|
483 | 486 | \end{note}
|
484 | 487 |
|
485 | 488 | \pnum
|
486 | 489 | \begin{note}
|
487 |
| -\tcode{\libconcept{UnsignedIntegral}<T>} can be satisfied even by types that are |
| 490 | +\libconcept{UnsignedIntegral} can be modeled even by types that are |
488 | 491 | not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}.
|
489 | 492 | \end{note}
|
490 | 493 | \end{itemdescr}
|
|
512 | 515 | \tcode{RHS}, and
|
513 | 516 | \item \tcode{rcopy} be a distinct object that is equal to \tcode{rhs}.
|
514 | 517 | \end{itemize}
|
515 |
| -\tcode{\libconcept{Assignable}<LHS, RHS>} is satisfied only if |
| 518 | +\tcode{LHS} and \tcode{RHS} model |
| 519 | +\tcode{\libconcept{Assignable}<LHS, RHS>} only if |
516 | 520 |
|
517 | 521 | \begin{itemize}
|
518 | 522 | \item \tcode{addressof(lhs = rhs) == addressof(lcopy)}.
|
|
758 | 762 | \pnum
|
759 | 763 | If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type
|
760 | 764 | \tcode{T} and \tcode{u2} a distinct object of type \tcode{T} equal to
|
761 |
| -\tcode{rv}. \tcode{\libconcept{MoveConstructible}<T>} is satisfied only if |
| 765 | +\tcode{rv}. \tcode{T} models \libconcept{MoveConstructible} only if |
762 | 766 |
|
763 | 767 | \begin{itemize}
|
764 | 768 | \item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}.
|
|
786 | 790 | \pnum
|
787 | 791 | If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type
|
788 | 792 | (possibly \tcode{const}) \tcode{T} or an rvalue of type \tcode{const T}.
|
789 |
| -\tcode{\libconcept{CopyConstructible}<T>} is satisfied only if |
| 793 | +\tcode{T} models \libconcept{CopyConstructible} only if |
790 | 794 |
|
791 | 795 | \begin{itemize}
|
792 | 796 | \item After the definition \tcode{T u = v;}, \tcode{u} is equal to \tcode{v}.
|
|
835 | 839 | \end{itemdecl}
|
836 | 840 |
|
837 | 841 | \pnum
|
838 |
| -Let \tcode{b1} and \tcode{b2} be lvalues of type |
839 |
| -\tcode{const remove_reference_t<B>}. |
840 |
| -\tcode{\libconcept{Boolean}<B>} is satisfied only if |
| 842 | +For some type \tcode{B}, let \tcode{b1} and \tcode{b2} be |
| 843 | +lvalues of type \tcode{const remove_reference_t<B>}. |
| 844 | +\tcode{B} models \libconcept{Boolean} only if |
841 | 845 |
|
842 | 846 | \begin{itemize}
|
843 | 847 | \item \tcode{bool(b1) == !bool(!b1)}.
|
|
881 | 885 |
|
882 | 886 | \begin{itemdescr}
|
883 | 887 | \pnum
|
884 |
| -Let \tcode{t} and \tcode{u} be lvalues of types |
| 888 | +For some types \tcode{T} and \tcode{U}, |
| 889 | +let \tcode{t} and \tcode{u} be lvalues of types |
885 | 890 | \tcode{const remove_reference_t<T>} and
|
886 | 891 | \tcode{const remove_reference_t<U>} respectively.
|
887 |
| -\tcode{\placeholder{weakly-equality-comparable-with}<T, U>} |
888 |
| -is satisfied only if: |
| 892 | +\tcode{T} and \tcode{U} model |
| 893 | +\tcode{\placeholder{weakly-equality-comparable-with}<T, U>} only if |
889 | 894 | \begin{itemize}
|
890 | 895 | \item \tcode{t == u}, \tcode{u == t}, \tcode{t != u}, and \tcode{u != t}
|
891 | 896 | have the same domain.
|
|
904 | 909 | \begin{itemdescr}
|
905 | 910 | \pnum
|
906 | 911 | Let \tcode{a} and \tcode{b} be objects of type \tcode{T}.
|
907 |
| -\tcode{\libconcept{EqualityComparable}<T>} is satisfied only if |
| 912 | +\tcode{T} models \libconcept{EqualityComparable} only if |
908 | 913 | \tcode{bool(a == b)} is \tcode{true} when \tcode{a} is equal to
|
909 | 914 | \tcode{b}\iref{concepts.equality}, and \tcode{false} otherwise.
|
910 | 915 |
|
|
930 | 935 |
|
931 | 936 | \begin{itemdescr}
|
932 | 937 | \pnum
|
933 |
| -Let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
| 938 | +For some types \tcode{T} and \tcode{U}, |
| 939 | +let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
934 | 940 | \tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
|
935 | 941 | and \tcode{C} be:
|
936 | 942 | \begin{codeblock}
|
937 | 943 | common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
938 | 944 | \end{codeblock}
|
939 |
| -\tcode{\libconcept{EqualityComparableWith}<T, U>} is satisfied only if |
| 945 | +\tcode{T} and \tcode{U} model |
| 946 | +\tcode{\libconcept{EqualityComparableWith}<T, U>} only if |
940 | 947 | \tcode{bool(t == u) == bool(C(t) == C(u))}.
|
941 | 948 | \end{itemdescr}
|
942 | 949 |
|
|
958 | 965 |
|
959 | 966 | \begin{itemdescr}
|
960 | 967 | \pnum
|
961 |
| -Let \tcode{a}, \tcode{b}, and \tcode{c} be lvalues of type |
962 |
| -\tcode{const remove_reference_t<T>}. |
963 |
| -\tcode{\libconcept{StrictTotallyOrdered}<T>} is satisfied only if |
| 968 | +For some type \tcode{T}, let \tcode{a}, \tcode{b}, and \tcode{c} be |
| 969 | +lvalues of type \tcode{const remove_reference_t<T>}. |
| 970 | +\tcode{T} models \libconcept{StrictTotallyOrdered} only if |
964 | 971 |
|
965 | 972 | \begin{itemize}
|
966 | 973 | \item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or
|
|
999 | 1006 |
|
1000 | 1007 | \begin{itemdescr}
|
1001 | 1008 | \pnum
|
1002 |
| -Let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
| 1009 | +For some types \tcode{T} and \tcode{U}, |
| 1010 | +let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
1003 | 1011 | \tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
|
1004 | 1012 | and \tcode{C} be:
|
1005 | 1013 | \begin{codeblock}
|
1006 | 1014 | common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
1007 | 1015 | \end{codeblock}
|
1008 |
| -\tcode{\libconcept{StrictTotallyOrderedWith}<T, U>} is satisfied only if |
| 1016 | +\tcode{T} and \tcode{U} model |
| 1017 | +\tcode{\libconcept{StrictTotallyOrderedWith}<T, U>} only if |
1009 | 1018 |
|
1010 | 1019 | \begin{itemize}
|
1011 | 1020 | \item \tcode{bool(t < u) == bool(C(t) < C(u)).}
|
|
1043 | 1052 | \begin{itemdescr}
|
1044 | 1053 | \pnum
|
1045 | 1054 | \begin{note}
|
1046 |
| -The \libconcept{Semiregular} concept is satisfied by types that behave similarly |
| 1055 | +The \libconcept{Semiregular} concept is modeled by types that behave similarly |
1047 | 1056 | to built-in types like \tcode{int}, except that they might not
|
1048 | 1057 | be comparable with \tcode{==}.
|
1049 | 1058 | \end{note}
|
1050 | 1059 |
|
1051 | 1060 | \pnum
|
1052 | 1061 | \begin{note}
|
1053 |
| -The \libconcept{Regular} concept is satisfied by types that behave similarly to |
| 1062 | +The \libconcept{Regular} concept is modeled by types that behave similarly to |
1054 | 1063 | built-in types like \tcode{int} and that are comparable with
|
1055 | 1064 | \tcode{==}.
|
1056 | 1065 | \end{note}
|
|
1082 | 1091 | \begin{itemdescr}
|
1083 | 1092 | \pnum
|
1084 | 1093 | \begin{example}
|
1085 |
| -A function that generates random numbers can satisfy \libconcept{Invocable}, |
| 1094 | +A function that generates random numbers can model \libconcept{Invocable}, |
1086 | 1095 | since the \tcode{invoke} function call expression is not required to be
|
1087 | 1096 | equality-preserving\iref{concepts.equality}.
|
1088 | 1097 | \end{example}
|
|
1108 | 1117 |
|
1109 | 1118 | \pnum
|
1110 | 1119 | \begin{example}
|
1111 |
| -A random number generator does not satisfy |
1112 |
| -\libconcept{RegularInvocable}. |
| 1120 | +A random number generator does not model \libconcept{RegularInvocable}. |
1113 | 1121 | \end{example}
|
1114 | 1122 |
|
1115 | 1123 | \pnum
|
|
1147 | 1155 |
|
1148 | 1156 | \begin{itemdescr}
|
1149 | 1157 | \pnum
|
1150 |
| -A \libconcept{Relation} satisfies \libconcept{StrictWeakOrder} only if |
| 1158 | +A \libconcept{Relation} models \libconcept{StrictWeakOrder} only if |
1151 | 1159 | it imposes a \term{strict weak ordering} on its arguments.
|
1152 | 1160 |
|
1153 | 1161 | \pnum
|
|
0 commit comments