|
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}
|
|
300 | 301 | \begin{itemdescr}
|
301 | 302 | \pnum
|
302 | 303 | \begin{note}
|
303 |
| -\tcode{\libconcept{DerivedFrom}<Derived, Base>} is satisfied if and only if |
| 304 | +Types \tcode{Derived} and \tcode{Base} model |
| 305 | +\tcode{\libconcept{DerivedFrom}<Derived, Base>} if and only if |
304 | 306 | \tcode{Derived} is publicly and unambiguously derived from \tcode{Base}, or
|
305 | 307 | \tcode{Derived} and \tcode{Base} are the same class type ignoring cv-qualifiers.
|
306 | 308 | \end{note}
|
|
332 | 334 | return f();
|
333 | 335 | }
|
334 | 336 | \end{codeblock}
|
| 337 | +for some types \tcode{From} and \tcode{To}, |
335 | 338 | and let \tcode{f} be a function with no arguments and return type \tcode{From}
|
336 | 339 | such that \tcode{f()} is equality-preserving.
|
337 |
| -\tcode{\libconcept{ConvertibleTo}<From, To>} is satisfied only if: |
| 340 | +\tcode{From} and \tcode{To} model \tcode{\libconcept{ConvertibleTo}<From, To>} |
| 341 | +only if: |
338 | 342 |
|
339 | 343 | \begin{itemize}
|
340 | 344 | \item
|
|
366 | 370 | \tcode{\libconcept{ConvertibleTo}<T, C>}
|
367 | 371 | and
|
368 | 372 | \tcode{\libconcept{ConvertibleTo}<U, C>}
|
369 |
| -are satisfied, then \tcode{T} and \tcode{U} share a |
| 373 | +are modeled, then \tcode{T} and \tcode{U} share a |
370 | 374 | \term{common reference type}, \tcode{C}.
|
371 | 375 | \begin{note}
|
372 | 376 | \tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
|
|
478 | 482 | \begin{itemdescr}
|
479 | 483 | \pnum
|
480 | 484 | \begin{note}
|
481 |
| -\tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are |
| 485 | +\tcode{\libconcept{SignedIntegral}<T>} can be modeled even by types that are |
482 | 486 | not signed integral types\iref{basic.fundamental}; for example, \tcode{char}.
|
483 | 487 | \end{note}
|
484 | 488 |
|
485 | 489 | \pnum
|
486 | 490 | \begin{note}
|
487 |
| -\tcode{\libconcept{UnsignedIntegral}<T>} can be satisfied even by types that are |
| 491 | +\tcode{\libconcept{UnsignedIntegral}<T>} can be modeled even by types that are |
488 | 492 | not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}.
|
489 | 493 | \end{note}
|
490 | 494 | \end{itemdescr}
|
|
512 | 516 | \tcode{RHS}, and
|
513 | 517 | \item \tcode{rcopy} be a distinct object that is equal to \tcode{rhs}.
|
514 | 518 | \end{itemize}
|
515 |
| -\tcode{\libconcept{Assignable}<LHS, RHS>} is satisfied only if |
| 519 | +\tcode{LHS} and \tcode{RHS} model |
| 520 | +\tcode{\libconcept{Assignable}<LHS, RHS>} only if |
516 | 521 |
|
517 | 522 | \begin{itemize}
|
518 | 523 | \item \tcode{addressof(lhs = rhs) == addressof(lcopy)}.
|
|
760 | 765 | \pnum
|
761 | 766 | If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type
|
762 | 767 | \tcode{T} and \tcode{u2} a distinct object of type \tcode{T} equal to
|
763 |
| -\tcode{rv}. \tcode{\libconcept{MoveConstructible}<T>} is satisfied only if |
| 768 | +\tcode{rv}. \tcode{T} models \libconcept{MoveConstructible} only if |
764 | 769 |
|
765 | 770 | \begin{itemize}
|
766 | 771 | \item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}.
|
|
788 | 793 | \pnum
|
789 | 794 | If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type
|
790 | 795 | (possibly \tcode{const}) \tcode{T} or an rvalue of type \tcode{const T}.
|
791 |
| -\tcode{\libconcept{CopyConstructible}<T>} is satisfied only if |
| 796 | +\tcode{T} models \libconcept{CopyConstructible} only if |
792 | 797 |
|
793 | 798 | \begin{itemize}
|
794 | 799 | \item After the definition \tcode{T u = v;}, \tcode{u} is equal to \tcode{v}.
|
|
837 | 842 | \end{itemdecl}
|
838 | 843 |
|
839 | 844 | \pnum
|
840 |
| -Let \tcode{b1} and \tcode{b2} be lvalues of type |
841 |
| -\tcode{const remove_reference_t<B>}. |
842 |
| -\tcode{\libconcept{Boolean}<B>} is satisfied only if |
| 845 | +For some type \tcode{B}, let \tcode{b1} and \tcode{b2} be |
| 846 | +lvalues of type \tcode{const remove_reference_t<B>}. |
| 847 | +\tcode{B} models \libconcept{Boolean} only if |
843 | 848 |
|
844 | 849 | \begin{itemize}
|
845 | 850 | \item \tcode{bool(b1) == !bool(!b1)}.
|
|
883 | 888 |
|
884 | 889 | \begin{itemdescr}
|
885 | 890 | \pnum
|
886 |
| -Let \tcode{t} and \tcode{u} be lvalues of types |
| 891 | +For some types \tcode{T} and \tcode{U}, |
| 892 | +let \tcode{t} and \tcode{u} be lvalues of types |
887 | 893 | \tcode{const remove_reference_t<T>} and
|
888 | 894 | \tcode{const remove_reference_t<U>} respectively.
|
889 |
| -\tcode{\placeholder{weakly-equality-comparable-with}<T, U>} |
890 |
| -is satisfied only if: |
| 895 | +\tcode{T} and \tcode{U} model |
| 896 | +\tcode{\placeholder{weakly-equality-comparable-with}<T, U>} only if |
891 | 897 | \begin{itemize}
|
892 | 898 | \item \tcode{t == u}, \tcode{u == t}, \tcode{t != u}, and \tcode{u != t}
|
893 | 899 | have the same domain.
|
|
906 | 912 | \begin{itemdescr}
|
907 | 913 | \pnum
|
908 | 914 | Let \tcode{a} and \tcode{b} be objects of type \tcode{T}.
|
909 |
| -\tcode{\libconcept{EqualityComparable}<T>} is satisfied only if |
| 915 | +\tcode{T} models \libconcept{EqualityComparable} only if |
910 | 916 | \tcode{bool(a == b)} is \tcode{true} when \tcode{a} is equal to
|
911 | 917 | \tcode{b}\iref{concepts.equality}, and \tcode{false} otherwise.
|
912 | 918 |
|
|
932 | 938 |
|
933 | 939 | \begin{itemdescr}
|
934 | 940 | \pnum
|
935 |
| -Let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
| 941 | +For some types \tcode{T} and \tcode{U}, |
| 942 | +let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
936 | 943 | \tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
|
937 | 944 | and \tcode{C} be:
|
938 | 945 | \begin{codeblock}
|
939 | 946 | common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
940 | 947 | \end{codeblock}
|
941 |
| -\tcode{\libconcept{EqualityComparableWith}<T, U>} is satisfied only if |
| 948 | +\tcode{T} and \tcode{U} model |
| 949 | +\tcode{\libconcept{EqualityComparableWith}<T, U>} only if |
942 | 950 | \tcode{bool(t == u) == bool(C(t) == C(u))}.
|
943 | 951 | \end{itemdescr}
|
944 | 952 |
|
|
960 | 968 |
|
961 | 969 | \begin{itemdescr}
|
962 | 970 | \pnum
|
963 |
| -Let \tcode{a}, \tcode{b}, and \tcode{c} be lvalues of type |
964 |
| -\tcode{const remove_reference_t<T>}. |
965 |
| -\tcode{\libconcept{StrictTotallyOrdered}<T>} is satisfied only if |
| 971 | +For some type \tcode{T}, let \tcode{a}, \tcode{b}, and \tcode{c} be |
| 972 | +lvalues of type \tcode{const remove_reference_t<T>}. |
| 973 | +\tcode{T} models \libconcept{StrictTotallyOrdered} only if |
966 | 974 |
|
967 | 975 | \begin{itemize}
|
968 | 976 | \item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or
|
|
1001 | 1009 |
|
1002 | 1010 | \begin{itemdescr}
|
1003 | 1011 | \pnum
|
1004 |
| -Let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
| 1012 | +For some types \tcode{T} and \tcode{U}, |
| 1013 | +let \tcode{t} be an lvalue of type \tcode{const remove_reference_t<T>}, |
1005 | 1014 | \tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
|
1006 | 1015 | and \tcode{C} be:
|
1007 | 1016 | \begin{codeblock}
|
1008 | 1017 | common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
|
1009 | 1018 | \end{codeblock}
|
1010 |
| -\tcode{\libconcept{StrictTotallyOrderedWith}<T, U>} is satisfied only if |
| 1019 | +\tcode{T} and \tcode{U} model |
| 1020 | +\tcode{\libconcept{StrictTotallyOrderedWith}<T, U>} only if |
1011 | 1021 |
|
1012 | 1022 | \begin{itemize}
|
1013 | 1023 | \item \tcode{bool(t < u) == bool(C(t) < C(u)).}
|
|
1045 | 1055 | \begin{itemdescr}
|
1046 | 1056 | \pnum
|
1047 | 1057 | \begin{note}
|
1048 |
| -The \libconcept{Semiregular} concept is satisfied by types that behave similarly |
| 1058 | +The \libconcept{Semiregular} concept is modeled by types that behave similarly |
1049 | 1059 | to built-in types like \tcode{int}, except that they might not
|
1050 | 1060 | be comparable with \tcode{==}.
|
1051 | 1061 | \end{note}
|
1052 | 1062 |
|
1053 | 1063 | \pnum
|
1054 | 1064 | \begin{note}
|
1055 |
| -The \libconcept{Regular} concept is satisfied by types that behave similarly to |
| 1065 | +The \libconcept{Regular} concept is modeled by types that behave similarly to |
1056 | 1066 | built-in types like \tcode{int} and that are comparable with
|
1057 | 1067 | \tcode{==}.
|
1058 | 1068 | \end{note}
|
|
1084 | 1094 | \begin{itemdescr}
|
1085 | 1095 | \pnum
|
1086 | 1096 | \begin{example}
|
1087 |
| -A function that generates random numbers can satisfy \libconcept{Invocable}, |
| 1097 | +A function that generates random numbers can model \libconcept{Invocable}, |
1088 | 1098 | since the \tcode{invoke} function call expression is not required to be
|
1089 | 1099 | equality-preserving\iref{concepts.equality}.
|
1090 | 1100 | \end{example}
|
|
1110 | 1120 |
|
1111 | 1121 | \pnum
|
1112 | 1122 | \begin{example}
|
1113 |
| -A random number generator does not satisfy |
| 1123 | +A random number generator does not model |
1114 | 1124 | \libconcept{RegularInvocable}.
|
1115 | 1125 | \end{example}
|
1116 | 1126 |
|
|
1149 | 1159 |
|
1150 | 1160 | \begin{itemdescr}
|
1151 | 1161 | \pnum
|
1152 |
| -A \libconcept{Relation} satisfies \libconcept{StrictWeakOrder} only if |
| 1162 | +A \libconcept{Relation} models \libconcept{StrictWeakOrder} only if |
1153 | 1163 | it imposes a \term{strict weak ordering} on its arguments.
|
1154 | 1164 |
|
1155 | 1165 | \pnum
|
|
0 commit comments