Skip to content

Commit fd8088c

Browse files
committed
Library-wide: Use "model" instead of "satisfy" with library concept requirements
Updates: [structure.requirements],[customization.point.object],[res.on.requirements],[concepts], and [range.semi.wrap]. Fixes #2591.
1 parent 2d94f2f commit fd8088c

File tree

3 files changed

+47
-37
lines changed

3 files changed

+47
-37
lines changed

source/concepts.tex

Lines changed: 39 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}
@@ -300,7 +301,8 @@
300301
\begin{itemdescr}
301302
\pnum
302303
\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
304306
\tcode{Derived} is publicly and unambiguously derived from \tcode{Base}, or
305307
\tcode{Derived} and \tcode{Base} are the same class type ignoring cv-qualifiers.
306308
\end{note}
@@ -332,9 +334,11 @@
332334
return f();
333335
}
334336
\end{codeblock}
337+
for some types \tcode{From} and \tcode{To},
335338
and let \tcode{f} be a function with no arguments and return type \tcode{From}
336339
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:
338342

339343
\begin{itemize}
340344
\item
@@ -366,7 +370,7 @@
366370
\tcode{\libconcept{ConvertibleTo}<T, C>}
367371
and
368372
\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
370374
\term{common reference type}, \tcode{C}.
371375
\begin{note}
372376
\tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
@@ -478,13 +482,13 @@
478482
\begin{itemdescr}
479483
\pnum
480484
\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
482486
not signed integral types\iref{basic.fundamental}; for example, \tcode{char}.
483487
\end{note}
484488

485489
\pnum
486490
\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
488492
not unsigned integral types\iref{basic.fundamental}; for example, \tcode{bool}.
489493
\end{note}
490494
\end{itemdescr}
@@ -512,7 +516,8 @@
512516
\tcode{RHS}, and
513517
\item \tcode{rcopy} be a distinct object that is equal to \tcode{rhs}.
514518
\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
516521

517522
\begin{itemize}
518523
\item \tcode{addressof(lhs = rhs) == addressof(lcopy)}.
@@ -760,7 +765,7 @@
760765
\pnum
761766
If \tcode{T} is an object type, then let \tcode{rv} be an rvalue of type
762767
\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
764769

765770
\begin{itemize}
766771
\item After the definition \tcode{T u = rv;}, \tcode{u} is equal to \tcode{u2}.
@@ -788,7 +793,7 @@
788793
\pnum
789794
If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type
790795
(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
792797

793798
\begin{itemize}
794799
\item After the definition \tcode{T u = v;}, \tcode{u} is equal to \tcode{v}.
@@ -837,9 +842,9 @@
837842
\end{itemdecl}
838843

839844
\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
843848

844849
\begin{itemize}
845850
\item \tcode{bool(b1) == !bool(!b1)}.
@@ -883,11 +888,12 @@
883888

884889
\begin{itemdescr}
885890
\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
887893
\tcode{const remove_reference_t<T>} and
888894
\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
891897
\begin{itemize}
892898
\item \tcode{t == u}, \tcode{u == t}, \tcode{t != u}, and \tcode{u != t}
893899
have the same domain.
@@ -906,7 +912,7 @@
906912
\begin{itemdescr}
907913
\pnum
908914
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
910916
\tcode{bool(a == b)} is \tcode{true} when \tcode{a} is equal to
911917
\tcode{b}\iref{concepts.equality}, and \tcode{false} otherwise.
912918

@@ -932,13 +938,15 @@
932938

933939
\begin{itemdescr}
934940
\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>},
936943
\tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
937944
and \tcode{C} be:
938945
\begin{codeblock}
939946
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
940947
\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
942950
\tcode{bool(t == u) == bool(C(t) == C(u))}.
943951
\end{itemdescr}
944952

@@ -960,9 +968,9 @@
960968

961969
\begin{itemdescr}
962970
\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
966974

967975
\begin{itemize}
968976
\item Exactly one of \tcode{bool(a < b)}, \tcode{bool(a > b)}, or
@@ -1001,13 +1009,15 @@
10011009

10021010
\begin{itemdescr}
10031011
\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>},
10051014
\tcode{u} be an lvalue of type \tcode{const remove_reference_t<U>},
10061015
and \tcode{C} be:
10071016
\begin{codeblock}
10081017
common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
10091018
\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
10111021

10121022
\begin{itemize}
10131023
\item \tcode{bool(t < u) == bool(C(t) < C(u)).}
@@ -1045,14 +1055,14 @@
10451055
\begin{itemdescr}
10461056
\pnum
10471057
\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
10491059
to built-in types like \tcode{int}, except that they might not
10501060
be comparable with \tcode{==}.
10511061
\end{note}
10521062

10531063
\pnum
10541064
\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
10561066
built-in types like \tcode{int} and that are comparable with
10571067
\tcode{==}.
10581068
\end{note}
@@ -1084,7 +1094,7 @@
10841094
\begin{itemdescr}
10851095
\pnum
10861096
\begin{example}
1087-
A function that generates random numbers can satisfy \libconcept{Invocable},
1097+
A function that generates random numbers can model \libconcept{Invocable},
10881098
since the \tcode{invoke} function call expression is not required to be
10891099
equality-preserving\iref{concepts.equality}.
10901100
\end{example}
@@ -1110,7 +1120,7 @@
11101120

11111121
\pnum
11121122
\begin{example}
1113-
A random number generator does not satisfy
1123+
A random number generator does not model
11141124
\libconcept{RegularInvocable}.
11151125
\end{example}
11161126

@@ -1149,7 +1159,7 @@
11491159

11501160
\begin{itemdescr}
11511161
\pnum
1152-
A \libconcept{Relation} satisfies \libconcept{StrictWeakOrder} only if
1162+
A \libconcept{Relation} models \libconcept{StrictWeakOrder} only if
11531163
it imposes a \term{strict weak ordering} on its arguments.
11541164

11551165
\pnum

source/lib-intro.tex

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

484484
\pnum
@@ -533,7 +533,7 @@
533533
concept\iref{concept.stricttotallyordered} does not meet the
534534
semantic requirements of that concept when operating on NaNs.
535535
\end{example}
536-
This does not affect whether a type satisfies the concept.
536+
This does not affect whether a type models the concept.
537537

538538
\pnum
539539
A declaration may explicitly impose requirements through its associated
@@ -993,23 +993,23 @@
993993
enforcing semantic requirements on that interaction.
994994

995995
\pnum
996-
The type of a customization point object shall satisfy
996+
The type of a customization point object shall model
997997
\libconcept{Semiregular}\iref{concepts.object}.
998998

999999
\pnum
10001000
All instances of a specific customization point object type shall
10011001
be equal\iref{concepts.equality}.
10021002

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

10111011
\pnum
1012-
Each customization point object type constrains its return type to satisfy a
1012+
Each customization point object type constrains its return type to model a
10131013
particular concept.
10141014

10151015
\pnum
@@ -2988,7 +2988,7 @@
29882988
\rSec3[res.on.requirements]{Semantic requirements}
29892989
\pnum
29902990
If the semantic requirements of a declaration's
2991-
constraints\iref{structure.requirements} are not satisfied at the point of use,
2991+
constraints\iref{structure.requirements} are not modeled at the point of use,
29922992
the program is ill-formed, no diagnostic required.
29932993

29942994
\rSec2[conforming]{Conforming implementations}

source/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2359,7 +2359,7 @@
23592359
\end{codeblock}
23602360

23612361
\item If \tcode{\libconcept{Assignable}<T\&, const T\&>} is not
2362-
satisfied, the copy assignment operator is equivalent to:
2362+
modeled, the copy assignment operator is equivalent to:
23632363
\begin{codeblock}
23642364
@\placeholder{semiregular}@& operator=(const @\placeholder{semiregular}@& that)
23652365
noexcept(is_nothrow_copy_constructible_v<T>)
@@ -2370,7 +2370,7 @@
23702370
}
23712371
\end{codeblock}
23722372

2373-
\item If \tcode{\libconcept{Assignable}<T\&, T>} is not satisfied,
2373+
\item If \tcode{\libconcept{Assignable}<T\&, T>} is not modeled,
23742374
the move assignment operator is equivalent to:
23752375
\begin{codeblock}
23762376
@\placeholder{semiregular}@& operator=(@\placeholder{semiregular}@&& that)

0 commit comments

Comments
 (0)