Skip to content

Commit b3b1f63

Browse files
CaseyCarterzygoloid
authored andcommitted
[library-wide] Use "model" instead of "satisfy" for semantic library concept requirements
Consistently use "satisfy" to mean the syntactic requirements are met, and "model" to mean the semantic requirements are met. Updates: [structure.requirements],[customization.point.object],[res.on.requirements],[concepts], and [range.semi.wrap]. Fixes #2591.
1 parent f6ad222 commit b3b1f63

File tree

3 files changed

+45
-37
lines changed

3 files changed

+45
-37
lines changed

source/concepts.tex

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@
134134
};
135135
\end{codeblock}
136136

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
139140
of implicit requirements, it is unspecified whether an implementation diagnoses
140141
as ill-formed a program that requires \tcode{C<T>}.
141142
\end{example}
@@ -332,9 +333,11 @@
332333
return f();
333334
}
334335
\end{codeblock}
336+
for some types \tcode{From} and \tcode{To},
335337
and let \tcode{f} be a function with no arguments and return type \tcode{From}
336338
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:
338341

339342
\begin{itemize}
340343
\item
@@ -366,7 +369,7 @@
366369
\tcode{\libconcept{ConvertibleTo}<T, C>}
367370
and
368371
\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
370373
\term{common reference type}, \tcode{C}.
371374
\begin{note}
372375
\tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
@@ -478,13 +481,13 @@
478481
\begin{itemdescr}
479482
\pnum
480483
\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
482485
not signed integral types\iref{basic.fundamental}; for example, \tcode{char}.
483486
\end{note}
484487

485488
\pnum
486489
\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
488491
not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}.
489492
\end{note}
490493
\end{itemdescr}
@@ -512,7 +515,8 @@
512515
\tcode{RHS}, and
513516
\item \tcode{rcopy} be a distinct object that is equal to \tcode{rhs}.
514517
\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
516520

517521
\begin{itemize}
518522
\item \tcode{addressof(lhs = rhs) == addressof(lcopy)}.
@@ -758,7 +762,7 @@
758762
\pnum
759763
If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type
760764
\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
762766

763767
\begin{itemize}
764768
\item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}.
@@ -786,7 +790,7 @@
786790
\pnum
787791
If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type
788792
(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
790794

791795
\begin{itemize}
792796
\item After the definition \tcode{T u = v;}, \tcode{u} is equal to \tcode{v}.
@@ -835,9 +839,9 @@
835839
\end{itemdecl}
836840

837841
\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
841845

842846
\begin{itemize}
843847
\item \tcode{bool(b1) == !bool(!b1)}.
@@ -881,11 +885,12 @@
881885

882886
\begin{itemdescr}
883887
\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
885890
\tcode{const remove_reference_t<T>} and
886891
\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
889894
\begin{itemize}
890895
\item \tcode{t == u}, \tcode{u == t}, \tcode{t != u}, and \tcode{u != t}
891896
have the same domain.
@@ -904,7 +909,7 @@
904909
\begin{itemdescr}
905910
\pnum
906911
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
908913
\tcode{bool(a == b)} is \tcode{true} when \tcode{a} is equal to
909914
\tcode{b}\iref{concepts.equality}, and \tcode{false} otherwise.
910915

@@ -930,13 +935,15 @@
930935

931936
\begin{itemdescr}
932937
\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>},
934940
\tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
935941
and \tcode{C} be:
936942
\begin{codeblock}
937943
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
938944
\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
940947
\tcode{bool(t == u) == bool(C(t) == C(u))}.
941948
\end{itemdescr}
942949

@@ -958,9 +965,9 @@
958965

959966
\begin{itemdescr}
960967
\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
964971

965972
\begin{itemize}
966973
\item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or
@@ -999,13 +1006,15 @@
9991006

10001007
\begin{itemdescr}
10011008
\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>},
10031011
\tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
10041012
and \tcode{C} be:
10051013
\begin{codeblock}
10061014
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
10071015
\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
10091018

10101019
\begin{itemize}
10111020
\item \tcode{bool(t < u) == bool(C(t) < C(u)).}
@@ -1043,14 +1052,14 @@
10431052
\begin{itemdescr}
10441053
\pnum
10451054
\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
10471056
to built-in types like \tcode{int}, except that they might not
10481057
be comparable with \tcode{==}.
10491058
\end{note}
10501059

10511060
\pnum
10521061
\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
10541063
built-in types like \tcode{int} and that are comparable with
10551064
\tcode{==}.
10561065
\end{note}
@@ -1082,7 +1091,7 @@
10821091
\begin{itemdescr}
10831092
\pnum
10841093
\begin{example}
1085-
A function that generates random numbers can satisfy \libconcept{Invocable},
1094+
A function that generates random numbers can model \libconcept{Invocable},
10861095
since the \tcode{invoke} function call expression is not required to be
10871096
equality-preserving\iref{concepts.equality}.
10881097
\end{example}
@@ -1108,8 +1117,7 @@
11081117

11091118
\pnum
11101119
\begin{example}
1111-
A random number generator does not satisfy
1112-
\libconcept{RegularInvocable}.
1120+
A random number generator does not model \libconcept{RegularInvocable}.
11131121
\end{example}
11141122

11151123
\pnum
@@ -1147,7 +1155,7 @@
11471155

11481156
\begin{itemdescr}
11491157
\pnum
1150-
A \libconcept{Relation} satisfies \libconcept{StrictWeakOrder} only if
1158+
A \libconcept{Relation} models \libconcept{StrictWeakOrder} only if
11511159
it imposes a \term{strict weak ordering} on its arguments.
11521160

11531161
\pnum

source/lib-intro.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@
481481
\item Template arguments
482482
\item Derived classes
483483
\item Containers, iterators, and algorithms that meet an interface convention or
484-
satisfy a concept
484+
model a concept
485485
\end{itemize}
486486

487487
\pnum
@@ -536,7 +536,7 @@
536536
concept\iref{concept.stricttotallyordered} does not meet the
537537
semantic requirements of that concept when operating on NaNs.
538538
\end{example}
539-
This does not affect whether a type satisfies the concept.
539+
This does not affect whether a type models the concept.
540540

541541
\pnum
542542
A declaration may explicitly impose requirements through its associated
@@ -997,23 +997,23 @@
997997
enforcing semantic requirements on that interaction.
998998

999999
\pnum
1000-
The type of a customization point object shall satisfy
1000+
The type of a customization point object shall model
10011001
\libconcept{Semiregular}\iref{concepts.object}.
10021002

10031003
\pnum
10041004
All instances of a specific customization point object type shall
10051005
be equal\iref{concepts.equality}.
10061006

10071007
\pnum
1008-
The type \tcode{T} of a customization point object shall satisfy
1008+
The type \tcode{T} of a customization point object shall model
10091009
\tcode{\libconcept{Invocable}<const T\&, Args...>}\iref{concept.invocable}
10101010
when the types in \tcode{Args...} meet the requirements specified in that
10111011
customization point object's definition. When the types of \tcode{Args...} do
10121012
not meet the customization point object's requirements, \tcode{T} shall not have
10131013
a function call operator that participates in overload resolution.
10141014

10151015
\pnum
1016-
Each customization point object type constrains its return type to satisfy a
1016+
Each customization point object type constrains its return type to model a
10171017
particular concept.
10181018

10191019
\pnum
@@ -2993,7 +2993,7 @@
29932993
\rSec3[res.on.requirements]{Semantic requirements}
29942994
\pnum
29952995
If the semantic requirements of a declaration's
2996-
constraints\iref{structure.requirements} are not satisfied at the point of use,
2996+
constraints\iref{structure.requirements} are not modeled at the point of use,
29972997
the program is ill-formed, no diagnostic required.
29982998

29992999
\rSec2[conforming]{Conforming implementations}

source/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@
23472347
\end{codeblock}
23482348

23492349
\item If \tcode{\libconcept{Assignable}<T\&, const T\&>} is not
2350-
satisfied, the copy assignment operator is equivalent to:
2350+
modeled, the copy assignment operator is equivalent to:
23512351
\begin{codeblock}
23522352
@\placeholder{semiregular-box}@& operator=(const @\placeholder{semiregular-box}@& that)
23532353
noexcept(is_nothrow_copy_constructible_v<T>)
@@ -2358,7 +2358,7 @@
23582358
}
23592359
\end{codeblock}
23602360

2361-
\item If \tcode{\libconcept{Assignable}<T\&, T>} is not satisfied,
2361+
\item If \tcode{\libconcept{Assignable}<T\&, T>} is not modeled,
23622362
the move assignment operator is equivalent to:
23632363
\begin{codeblock}
23642364
@\placeholder{semiregular-box}@& operator=(@\placeholder{semiregular-box}@&& that)

0 commit comments

Comments
 (0)