Skip to content

Commit 60ae4bf

Browse files
CaseyCarterzygoloid
authored andcommitted
[concepts] There need be no "there need be no subsumption relationship"
... the core language rules already imply it.
1 parent 11b6f18 commit 60ae4bf

File tree

1 file changed

+0
-96
lines changed

1 file changed

+0
-96
lines changed

source/concepts.tex

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -258,28 +258,6 @@
258258
features. These concepts express relationships between types, type
259259
classifications, and fundamental type properties.
260260

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-
283261
\rSec2[concept.same]{Concept \libconcept{Same}}
284262

285263
\indexlibrary{\idxcode{Same}}%
@@ -289,12 +267,6 @@
289267
\end{itemdecl}
290268

291269
\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-
298270
\pnum
299271
\tcode{\libconcept{Same}<T, U>} subsumes \tcode{\libconcept{Same}<U, T>} and
300272
vice versa.
@@ -311,15 +283,6 @@
311283
\end{itemdecl}
312284

313285
\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-
323286
\pnum
324287
\begin{note}
325288
\tcode{\libconcept{DerivedFrom}<Derived, Base>} is satisfied if and only if
@@ -376,14 +339,7 @@
376339
Otherwise, the object referred to by \tcode{f()} is not modified by either above
377340
expression.
378341
\end{itemize}
379-
380342
\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>}.
387343
\end{itemdescr}
388344

389345

@@ -497,18 +453,6 @@
497453
\end{itemdecl}
498454

499455
\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-
512456
\pnum
513457
\begin{note}
514458
\tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are
@@ -565,12 +509,6 @@
565509
\end{itemize}
566510
\end{itemize}
567511

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-
574512
\pnum
575513
\begin{note}
576514
Assignment need not be a total function\iref{structure.requirements};
@@ -607,12 +545,6 @@
607545
\item the lookup set produced by argument-dependent
608546
lookup\iref{basic.lookup.argdep}.
609547
\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>}.
616548
\end{itemdescr}
617549

618550
\indexlibrary{\idxcode{SwappableWith}}%
@@ -659,12 +591,6 @@
659591
\item the lookup set produced by argument-dependent
660592
lookup\iref{basic.lookup.argdep}.
661593
\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}.
668594
\end{itemdescr}
669595

670596
\begin{itemdescr}
@@ -746,12 +672,6 @@
746672
\end{itemdecl}
747673

748674
\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-
755675
\pnum
756676
\begin{note}
757677
Unlike the \oldconcept{Destructible} requirements~(\tref{destructible}), this
@@ -771,14 +691,6 @@
771691
concept Constructible = Destructible<T> && is_constructible_v<T, Args...>;
772692
\end{itemdecl}
773693

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-
782694
\rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}}
783695

784696
\indexlibrary{\idxcode{DefaultConstructible}}%
@@ -1075,14 +987,6 @@
1075987
concept Movable = is_object_v<T> && MoveConstructible<T> && Assignable<T&, T> && Swappable<T>;
1076988
\end{itemdecl}
1077989

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-
1086990
\rSec2[concept.copyable]{Concept \libconcept{Copyable}}
1087991

1088992
\indexlibrary{\idxcode{Copyable}}%

0 commit comments

Comments
 (0)