Skip to content

Commit 98c2c56

Browse files
committed
[class.prop] [special] Move definition of eligible special member
functions to the section on special member functions.
1 parent 65aa018 commit 98c2c56

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4089,7 +4089,7 @@
40894089
\pnum
40904090
When an object of class type \tcode{X}
40914091
is passed to or returned from a function,
4092-
if \tcode{X} has at least one eligible copy or move constructor\iref{class.prop},
4092+
if \tcode{X} has at least one eligible copy or move constructor\iref{special},
40934093
each such constructor is trivial,
40944094
and the destructor of \tcode{X} is either trivial or deleted,
40954095
implementations are permitted

source/classes.tex

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,14 @@
142142

143143
\rSec1[class.prop]{Properties of classes}
144144

145-
\pnum
146-
Two special member functions are of the same kind if:
147-
\begin{itemize}
148-
\item they are both default constructors,
149-
\item they are both copy or move constructors
150-
with the same first parameter type, or
151-
\item they are both copy or move assignment operators
152-
with the same first parameter type
153-
and the same \grammarterm{cv-qualifier}s and \grammarterm{ref-qualifier}, if any.
154-
\end{itemize}
155-
156-
\pnum
157-
An \defnadj{eligible}{special member function} is a special member function\iref{special} for which:
158-
\begin{itemize}
159-
\item the function is not deleted,
160-
\item the associated constraints\iref{temp.constr}, if any, are satisfied, and
161-
\item no special member function of the same kind is more constrained\iref{temp.constr.order}.
162-
\end{itemize}
163-
164145
\pnum
165146
A \defnadj{trivially copyable}{class} is a class:
166147

167148
\begin{itemize}
168-
\item that has at least one eligible copy constructor, move constructor,
149+
\item that has at least one eligible
150+
copy constructor, move constructor,
169151
copy assignment operator, or
170-
move assignment operator~(\ref{class.copy.ctor}, \ref{class.copy.assign}),
152+
move assignment operator~(\ref{special}, \ref{class.copy.ctor}, \ref{class.copy.assign}),
171153
\item where each eligible copy constructor, move constructor, copy assignment operator,
172154
and move assignment operator is trivial, and
173155
\item that has a trivial, non-deleted destructor\iref{class.dtor}.
@@ -1213,6 +1195,25 @@
12131195
ensures that only derived classes and friends can create objects using it.
12141196
\end{example}
12151197

1198+
\pnum
1199+
Two special member functions are of the same kind if:
1200+
\begin{itemize}
1201+
\item they are both default constructors,
1202+
\item they are both copy or move constructors
1203+
with the same first parameter type, or
1204+
\item they are both copy or move assignment operators
1205+
with the same first parameter type
1206+
and the same \grammarterm{cv-qualifier}s and \grammarterm{ref-qualifier}, if any.
1207+
\end{itemize}
1208+
1209+
\pnum
1210+
An \defnadj{eligible}{special member function} is a special member function for which:
1211+
\begin{itemize}
1212+
\item the function is not deleted,
1213+
\item the associated constraints\iref{temp.constr}, if any, are satisfied, and
1214+
\item no special member function of the same kind is more constrained\iref{temp.constr.order}.
1215+
\end{itemize}
1216+
12161217
\pnum
12171218
For a class, its non-static data members, its non-virtual direct base classes,
12181219
and, if the class is not abstract\iref{class.abstract}, its virtual base

source/declarations.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6071,7 +6071,7 @@
60716071
that is not a destructor is defined as deleted.
60726072
A defaulted special member function
60736073
that is neither a prospective destructor nor
6074-
an eligible special member function\iref{class.prop}
6074+
an eligible special member function\iref{special}
60756075
is defined as deleted.
60766076
A function is
60776077
\defn{user-provided} if it is user-declared and not explicitly

source/expressions.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,10 +3111,11 @@
31113111
After these conversions, if the
31123112
argument does not have arithmetic, enumeration, pointer, pointer-to-member,
31133113
or class type, the program is ill-formed. Passing a potentially-evaluated
3114-
argument of class type\iref{class} having an eligible\iref{class.prop} non-trivial
3114+
argument of class type\iref{class} having an eligible non-trivial
31153115
copy constructor, an eligible non-trivial move constructor,
31163116
or a
3117-
non-trivial destructor, with no corresponding parameter, is conditionally-supported with
3117+
non-trivial destructor\iref{special},
3118+
with no corresponding parameter, is conditionally-supported with
31183119
\impldef{passing argument of class type through ellipsis} semantics. If the argument has
31193120
integral or enumeration type that is subject to the integral
31203121
promotions\iref{conv.prom}, or a floating-point type that is subject to the

0 commit comments

Comments
 (0)