tmp/tmpv0gkq4rf/{from.md → to.md}
RENAMED
|
@@ -23,29 +23,33 @@ as follows:
|
|
| 23 |
The *constructor characteristics* of a constructor or constructor
|
| 24 |
template are
|
| 25 |
|
| 26 |
- the template parameter list ([[temp.param]]), if any,
|
| 27 |
- the *parameter-type-list* ([[dcl.fct]]),
|
| 28 |
-
- the *exception-specification* ([[except.spec]]),
|
| 29 |
- absence or presence of `explicit` ([[class.conv.ctor]]), and
|
| 30 |
- absence or presence of `constexpr` ([[dcl.constexpr]]).
|
| 31 |
|
| 32 |
For each non-template constructor in the candidate set of inherited
|
| 33 |
constructors other than a constructor having no parameters or a
|
| 34 |
copy/move constructor having a single parameter, a constructor is
|
| 35 |
implicitly declared with the same constructor characteristics unless
|
| 36 |
there is a user-declared constructor with the same signature in the
|
| 37 |
-
class where the *using-declaration* appears
|
| 38 |
-
|
| 39 |
-
constructor template
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
A constructor so declared has the same access as the corresponding
|
| 45 |
constructor in `X`. It is deleted if the corresponding constructor in
|
| 46 |
-
`X` is deleted ([[dcl.fct.def]]).
|
|
|
|
|
|
|
| 47 |
|
| 48 |
Default and copy/move constructors may be implicitly declared as
|
| 49 |
specified in [[class.ctor]] and [[class.copy]].
|
| 50 |
|
| 51 |
``` cpp
|
|
@@ -188,10 +192,11 @@ while writing a message to the standard log whenever an object of class
|
|
| 188 |
[basic.stc.dynamic]: basic.md#basic.stc.dynamic
|
| 189 |
[basic.stc.dynamic.deallocation]: basic.md#basic.stc.dynamic.deallocation
|
| 190 |
[basic.stc.static]: basic.md#basic.stc.static
|
| 191 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 192 |
[basic.types]: basic.md#basic.types
|
|
|
|
| 193 |
[class.abstract]: class.md#class.abstract
|
| 194 |
[class.access]: class.md#class.access
|
| 195 |
[class.base.init]: #class.base.init
|
| 196 |
[class.cdtor]: #class.cdtor
|
| 197 |
[class.conv]: #class.conv
|
|
@@ -200,19 +205,19 @@ while writing a message to the standard log whenever an object of class
|
|
| 200 |
[class.copy]: #class.copy
|
| 201 |
[class.ctor]: #class.ctor
|
| 202 |
[class.dtor]: #class.dtor
|
| 203 |
[class.expl.init]: #class.expl.init
|
| 204 |
[class.free]: #class.free
|
|
|
|
| 205 |
[class.inhctor]: #class.inhctor
|
| 206 |
[class.init]: #class.init
|
| 207 |
[class.mem]: class.md#class.mem
|
| 208 |
[class.member.lookup]: class.md#class.member.lookup
|
| 209 |
[class.mfct]: class.md#class.mfct
|
| 210 |
[class.mi]: class.md#class.mi
|
| 211 |
-
[class.
|
| 212 |
[class.temporary]: #class.temporary
|
| 213 |
-
[class.this]: class.md#class.this
|
| 214 |
[class.union]: class.md#class.union
|
| 215 |
[class.virtual]: class.md#class.virtual
|
| 216 |
[conv]: conv.md#conv
|
| 217 |
[conv.lval]: conv.md#conv.lval
|
| 218 |
[dcl.array]: dcl.md#dcl.array
|
|
@@ -227,11 +232,11 @@ while writing a message to the standard log whenever an object of class
|
|
| 227 |
[dcl.init.list]: dcl.md#dcl.init.list
|
| 228 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
| 229 |
[dcl.type.cv]: dcl.md#dcl.type.cv
|
| 230 |
[diff.special]: compatibility.md#diff.special
|
| 231 |
[except]: except.md#except
|
| 232 |
-
[except.
|
| 233 |
[except.spec]: except.md#except.spec
|
| 234 |
[except.throw]: except.md#except.throw
|
| 235 |
[expr]: expr.md#expr
|
| 236 |
[expr.ass]: expr.md#expr.ass
|
| 237 |
[expr.call]: expr.md#expr.call
|
|
@@ -254,52 +259,52 @@ while writing a message to the standard log whenever an object of class
|
|
| 254 |
[over.best.ics]: over.md#over.best.ics
|
| 255 |
[over.ics.ref]: over.md#over.ics.ref
|
| 256 |
[over.load]: over.md#over.load
|
| 257 |
[over.match]: over.md#over.match
|
| 258 |
[over.match.best]: over.md#over.match.best
|
|
|
|
| 259 |
[special]: #special
|
| 260 |
[stmt.dcl]: stmt.md#stmt.dcl
|
| 261 |
[stmt.return]: stmt.md#stmt.return
|
|
|
|
|
|
|
|
|
|
| 262 |
[temp.over.link]: temp.md#temp.over.link
|
| 263 |
[temp.param]: temp.md#temp.param
|
| 264 |
[temp.variadic]: temp.md#temp.variadic
|
| 265 |
|
| 266 |
-
[^1]:
|
|
|
|
|
|
|
|
|
|
| 267 |
purposes of overload resolution ([[over.best.ics]],
|
| 268 |
[[over.ics.ref]]) and therefore initialization ([[dcl.init]]) and
|
| 269 |
explicit casts ([[expr.static.cast]]). A conversion to `void` does
|
| 270 |
not invoke any conversion function ([[expr.static.cast]]). Even
|
| 271 |
though never directly called to perform a conversion, such
|
| 272 |
conversion functions can be declared and can potentially be reached
|
| 273 |
through a call to a virtual conversion function in a base class.
|
| 274 |
|
| 275 |
-
[^
|
| 276 |
`operator` `delete` because [[expr.delete]] requires that in this
|
| 277 |
situation, the static type of the object to be deleted be the same
|
| 278 |
as its dynamic type.
|
| 279 |
|
| 280 |
-
[^3]: If the static type of the object to be deleted is different from
|
| 281 |
-
the dynamic type and the destructor is not virtual the size might be
|
| 282 |
-
incorrect, but that case is already undefined; see [[expr.delete]].
|
| 283 |
-
|
| 284 |
[^4]: This implies that the reference parameter of the
|
| 285 |
implicitly-declared copy constructor cannot bind to a `volatile`
|
| 286 |
lvalue; see [[diff.special]].
|
| 287 |
|
| 288 |
-
[^5]:
|
| 289 |
-
initialization.
|
| 290 |
-
|
| 291 |
-
[^6]: Because a template assignment operator or an assignment operator
|
| 292 |
taking an rvalue reference parameter is never a copy assignment
|
| 293 |
operator, the presence of such an assignment operator does not
|
| 294 |
suppress the implicit declaration of a copy assignment operator.
|
| 295 |
Such assignment operators participate in overload resolution with
|
| 296 |
other assignment operators, including copy assignment operators,
|
| 297 |
and, if selected, will be used to assign an object.
|
| 298 |
|
| 299 |
-
[^
|
| 300 |
implicitly-declared copy assignment operator cannot bind to a
|
| 301 |
`volatile` lvalue; see [[diff.special]].
|
| 302 |
|
| 303 |
-
[^
|
| 304 |
copy/move constructor is not executed, there is still one object
|
| 305 |
destroyed for each one constructed.
|
|
|
|
| 23 |
The *constructor characteristics* of a constructor or constructor
|
| 24 |
template are
|
| 25 |
|
| 26 |
- the template parameter list ([[temp.param]]), if any,
|
| 27 |
- the *parameter-type-list* ([[dcl.fct]]),
|
|
|
|
| 28 |
- absence or presence of `explicit` ([[class.conv.ctor]]), and
|
| 29 |
- absence or presence of `constexpr` ([[dcl.constexpr]]).
|
| 30 |
|
| 31 |
For each non-template constructor in the candidate set of inherited
|
| 32 |
constructors other than a constructor having no parameters or a
|
| 33 |
copy/move constructor having a single parameter, a constructor is
|
| 34 |
implicitly declared with the same constructor characteristics unless
|
| 35 |
there is a user-declared constructor with the same signature in the
|
| 36 |
+
complete class where the *using-declaration* appears or the constructor
|
| 37 |
+
would be a default, copy, or move constructor for that class. Similarly,
|
| 38 |
+
for each constructor template in the candidate set of inherited
|
| 39 |
+
constructors, a constructor template is implicitly declared with the
|
| 40 |
+
same constructor characteristics unless there is an equivalent
|
| 41 |
+
user-declared constructor template ([[temp.over.link]]) in the complete
|
| 42 |
+
class where the *using-declaration* appears. Default arguments are not
|
| 43 |
+
inherited. An *exception-specification* is implied as specified in
|
| 44 |
+
[[except.spec]].
|
| 45 |
|
| 46 |
A constructor so declared has the same access as the corresponding
|
| 47 |
constructor in `X`. It is deleted if the corresponding constructor in
|
| 48 |
+
`X` is deleted ([[dcl.fct.def]]). An inheriting constructor shall not
|
| 49 |
+
be explicitly instantiated ([[temp.explicit]]) or explicitly
|
| 50 |
+
specialized ([[temp.expl.spec]]).
|
| 51 |
|
| 52 |
Default and copy/move constructors may be implicitly declared as
|
| 53 |
specified in [[class.ctor]] and [[class.copy]].
|
| 54 |
|
| 55 |
``` cpp
|
|
|
|
| 192 |
[basic.stc.dynamic]: basic.md#basic.stc.dynamic
|
| 193 |
[basic.stc.dynamic.deallocation]: basic.md#basic.stc.dynamic.deallocation
|
| 194 |
[basic.stc.static]: basic.md#basic.stc.static
|
| 195 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 196 |
[basic.types]: basic.md#basic.types
|
| 197 |
+
[class]: class.md#class
|
| 198 |
[class.abstract]: class.md#class.abstract
|
| 199 |
[class.access]: class.md#class.access
|
| 200 |
[class.base.init]: #class.base.init
|
| 201 |
[class.cdtor]: #class.cdtor
|
| 202 |
[class.conv]: #class.conv
|
|
|
|
| 205 |
[class.copy]: #class.copy
|
| 206 |
[class.ctor]: #class.ctor
|
| 207 |
[class.dtor]: #class.dtor
|
| 208 |
[class.expl.init]: #class.expl.init
|
| 209 |
[class.free]: #class.free
|
| 210 |
+
[class.friend]: class.md#class.friend
|
| 211 |
[class.inhctor]: #class.inhctor
|
| 212 |
[class.init]: #class.init
|
| 213 |
[class.mem]: class.md#class.mem
|
| 214 |
[class.member.lookup]: class.md#class.member.lookup
|
| 215 |
[class.mfct]: class.md#class.mfct
|
| 216 |
[class.mi]: class.md#class.mi
|
| 217 |
+
[class.qual]: basic.md#class.qual
|
| 218 |
[class.temporary]: #class.temporary
|
|
|
|
| 219 |
[class.union]: class.md#class.union
|
| 220 |
[class.virtual]: class.md#class.virtual
|
| 221 |
[conv]: conv.md#conv
|
| 222 |
[conv.lval]: conv.md#conv.lval
|
| 223 |
[dcl.array]: dcl.md#dcl.array
|
|
|
|
| 232 |
[dcl.init.list]: dcl.md#dcl.init.list
|
| 233 |
[dcl.init.ref]: dcl.md#dcl.init.ref
|
| 234 |
[dcl.type.cv]: dcl.md#dcl.type.cv
|
| 235 |
[diff.special]: compatibility.md#diff.special
|
| 236 |
[except]: except.md#except
|
| 237 |
+
[except.ctor]: except.md#except.ctor
|
| 238 |
[except.spec]: except.md#except.spec
|
| 239 |
[except.throw]: except.md#except.throw
|
| 240 |
[expr]: expr.md#expr
|
| 241 |
[expr.ass]: expr.md#expr.ass
|
| 242 |
[expr.call]: expr.md#expr.call
|
|
|
|
| 259 |
[over.best.ics]: over.md#over.best.ics
|
| 260 |
[over.ics.ref]: over.md#over.ics.ref
|
| 261 |
[over.load]: over.md#over.load
|
| 262 |
[over.match]: over.md#over.match
|
| 263 |
[over.match.best]: over.md#over.match.best
|
| 264 |
+
[over.over]: over.md#over.over
|
| 265 |
[special]: #special
|
| 266 |
[stmt.dcl]: stmt.md#stmt.dcl
|
| 267 |
[stmt.return]: stmt.md#stmt.return
|
| 268 |
+
[temp.dep.type]: temp.md#temp.dep.type
|
| 269 |
+
[temp.expl.spec]: temp.md#temp.expl.spec
|
| 270 |
+
[temp.explicit]: temp.md#temp.explicit
|
| 271 |
[temp.over.link]: temp.md#temp.over.link
|
| 272 |
[temp.param]: temp.md#temp.param
|
| 273 |
[temp.variadic]: temp.md#temp.variadic
|
| 274 |
|
| 275 |
+
[^1]: The same rules apply to initialization of an `initializer_list`
|
| 276 |
+
object ([[dcl.init.list]]) with its underlying temporary array
|
| 277 |
+
|
| 278 |
+
[^2]: These conversions are considered as standard conversions for the
|
| 279 |
purposes of overload resolution ([[over.best.ics]],
|
| 280 |
[[over.ics.ref]]) and therefore initialization ([[dcl.init]]) and
|
| 281 |
explicit casts ([[expr.static.cast]]). A conversion to `void` does
|
| 282 |
not invoke any conversion function ([[expr.static.cast]]). Even
|
| 283 |
though never directly called to perform a conversion, such
|
| 284 |
conversion functions can be declared and can potentially be reached
|
| 285 |
through a call to a virtual conversion function in a base class.
|
| 286 |
|
| 287 |
+
[^3]: A similar provision is not needed for the array version of
|
| 288 |
`operator` `delete` because [[expr.delete]] requires that in this
|
| 289 |
situation, the static type of the object to be deleted be the same
|
| 290 |
as its dynamic type.
|
| 291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
[^4]: This implies that the reference parameter of the
|
| 293 |
implicitly-declared copy constructor cannot bind to a `volatile`
|
| 294 |
lvalue; see [[diff.special]].
|
| 295 |
|
| 296 |
+
[^5]: Because a template assignment operator or an assignment operator
|
|
|
|
|
|
|
|
|
|
| 297 |
taking an rvalue reference parameter is never a copy assignment
|
| 298 |
operator, the presence of such an assignment operator does not
|
| 299 |
suppress the implicit declaration of a copy assignment operator.
|
| 300 |
Such assignment operators participate in overload resolution with
|
| 301 |
other assignment operators, including copy assignment operators,
|
| 302 |
and, if selected, will be used to assign an object.
|
| 303 |
|
| 304 |
+
[^6]: This implies that the reference parameter of the
|
| 305 |
implicitly-declared copy assignment operator cannot bind to a
|
| 306 |
`volatile` lvalue; see [[diff.special]].
|
| 307 |
|
| 308 |
+
[^7]: Because only one object is destroyed instead of two, and one
|
| 309 |
copy/move constructor is not executed, there is still one object
|
| 310 |
destroyed for each one constructed.
|