Skip to content

Commit f58280f

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 203c7cf commit f58280f

File tree

1 file changed

+0
-98
lines changed

1 file changed

+0
-98
lines changed

source/concepts.tex

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,6 @@
267267
features. These concepts express relationships between types, type
268268
classifications, and fundamental type properties.
269269

270-
\pnum
271-
\begin{example}
272-
Several concept specifications in this subclause are specified in terms of a
273-
type trait, and include an annotation that there need be no subsumption
274-
relationship between the concept and the type trait. Given the following set of
275-
declarations:
276-
\begin{codeblock}
277-
template<class T> concept C1 = is_c1_v<T>;
278-
template<class U> concept C2 = C1<U> && true;
279-
280-
template<C1 T> void f(T); // \#1
281-
template<C2 T> void f(T); // \#2
282-
283-
template<class T>
284-
void g(T) requires is_c1_v<T>; // \#3
285-
template<C2 T> void g(T); // \#4
286-
\end{codeblock}
287-
Since \tcode{C2} subsumes \tcode{C1}, the expression \tcode{f(42)} unambiguously
288-
calls \#2. \tcode{g(42)}, however, is potentially ambiguous if there need be no
289-
subsumption relationship between \tcode{C1} and \tcode{is_c1_v}.
290-
\end{example}
291-
292270
\rSec2[concept.same]{Concept \libconcept{Same}}
293271

294272
\indexlibrary{\idxcode{Same}}%
@@ -298,12 +276,6 @@
298276
\end{itemdecl}
299277

300278
\begin{itemdescr}
301-
\pnum
302-
There need be no subsumption relationship between
303-
\tcode{\libconcept{Same}<T, U>}
304-
and
305-
\tcode{is_same_v<T, U>}.
306-
307279
\pnum
308280
\tcode{\libconcept{Same}<T, U>} subsumes \tcode{\libconcept{Same}<U, T>} and
309281
vice versa.
@@ -319,15 +291,6 @@
319291
\end{itemdecl}
320292

321293
\begin{itemdescr}
322-
\pnum
323-
There need be no subsumption relationship between
324-
\tcode{\libconcept{DerivedFrom}<Derived, Base>}
325-
and either
326-
\tcode{is_base_of_v<Base, Derived>}
327-
or
328-
\tcode{is_convertible_v<const volatile Derived*,
329-
const \brk{}volatile \brk{}Base*>}.
330-
331294
\pnum
332295
\begin{note}
333296
\tcode{\libconcept{DerivedFrom}<Derived, Base>} is satisfied if and only if
@@ -383,14 +346,7 @@
383346
Otherwise, the object referred to by \tcode{f()} is not modified by either above
384347
expression.
385348
\end{itemize}
386-
387349
\end{itemize}
388-
389-
\pnum
390-
There need be no subsumption relationship between
391-
\tcode{\libconcept{ConvertibleTo}<From, To>}
392-
and
393-
\tcode{is_\-convert\-ible_v\brk{}<From,\brk{} To>}.
394350
\end{itemdescr}
395351

396352

@@ -497,14 +453,6 @@
497453
concept Integral = is_integral_v<T>;
498454
\end{itemdecl}
499455

500-
\begin{itemdescr}
501-
\pnum
502-
There need be no subsumption relationship between
503-
\tcode{\libconcept{Integral}<T>}
504-
and
505-
\tcode{is_integral_v<T>}.
506-
\end{itemdescr}
507-
508456
\rSec2[concept.signed.int]{Concept \libconcept{SignedIntegral}}
509457

510458
\indexlibrary{\idxcode{SignedIntegral}}%
@@ -514,12 +462,6 @@
514462
\end{itemdecl}
515463

516464
\begin{itemdescr}
517-
\pnum
518-
There need be no subsumption relationship between
519-
\tcode{\libconcept{SignedIntegral}<T>}
520-
and
521-
\tcode{is_signed_v<T>}.
522-
523465
\pnum
524466
\begin{note}
525467
\tcode{\libconcept{SignedIntegral}<T>} can be satisfied even by types that are
@@ -586,12 +528,6 @@
586528
\end{itemize}
587529
\end{itemize}
588530

589-
\pnum
590-
There need be no subsumption relationship between
591-
\tcode{\libconcept{Assignable}<LHS, RHS>}
592-
and
593-
\tcode{is_lvalue_refer\-ence_v<LHS>}.
594-
595531
\pnum
596532
\begin{note}
597533
Assignment need not be a total function\iref{structure.requirements};
@@ -628,12 +564,6 @@
628564
\item the lookup set produced by argument-dependent
629565
lookup\iref{basic.lookup.argdep}.
630566
\end{itemize}
631-
632-
\pnum
633-
There need be no subsumption relationship between
634-
\tcode{\libconcept{Swappable}<T>}
635-
and
636-
\tcode{is_swappable_v<T>}.
637567
\end{itemdescr}
638568

639569
\indexlibrary{\idxcode{SwappableWith}}%
@@ -678,12 +608,6 @@
678608
\item the lookup set produced by argument-dependent
679609
lookup\iref{basic.lookup.argdep}.
680610
\end{itemize}
681-
682-
\pnum
683-
There need be no subsumption relationship between
684-
\tcode{\libconcept{SwappableWith}<T, U>}
685-
and any specialization of
686-
\tcode{is_swappable_with_v}.
687611
\end{itemdescr}
688612

689613
\begin{itemdescr}
@@ -764,12 +688,6 @@
764688
\end{itemdecl}
765689

766690
\begin{itemdescr}
767-
\pnum
768-
There need be no subsumption relationship between
769-
\tcode{\libconcept{Destructible}<T>}
770-
and
771-
\tcode{is_\-no\-throw_\-destruct\-ible_v<T>}.
772-
773691
\pnum
774692
\begin{note}
775693
Unlike the \oldconcept{Destructible} requirements~(\tref{destructible}), this
@@ -789,14 +707,6 @@
789707
concept Constructible = Destructible<T> && is_constructible_v<T, Args...>;
790708
\end{itemdecl}
791709

792-
\begin{itemdescr}
793-
\pnum
794-
There need be no subsumption relationship between
795-
\tcode{\libconcept{Constructible}<T, Args...>}
796-
and
797-
\tcode{is_const\-ruct\-ible_v<T, Args...>}.
798-
\end{itemdescr}
799-
800710
\rSec2[concept.defaultconstructible]{Concept \libconcept{DefaultConstructible}}
801711

802712
\indexlibrary{\idxcode{DefaultConstructible}}%
@@ -1089,14 +999,6 @@
1089999
concept Movable = is_object_v<T> && MoveConstructible<T> && Assignable<T&, T> && Swappable<T>;
10901000
\end{itemdecl}
10911001

1092-
\begin{itemdescr}
1093-
\pnum
1094-
There need be no subsumption relationship between
1095-
\tcode{\libconcept{Movable}<T>}
1096-
and
1097-
\tcode{is_object_v<T>}.
1098-
\end{itemdescr}
1099-
11001002
\rSec2[concept.copyable]{Concept \libconcept{Copyable}}
11011003

11021004
\indexlibrary{\idxcode{Copyable}}%

0 commit comments

Comments
 (0)